I have a long-running process to build a directory tree in a database
from a very large and deep folder structure. I am using sessions for
security, but the process takes so long that it never finishes.
Having tried and failed to override the session time-out, I am trying
to work around the problem by having a PeriodicUpdater tickle the
session by loading a page every minute. But I am also using Updater to
submit the admin form.
I call the PeriodicUpdater first, then the Updater to submit the form.
Both fire, and the PeriodicUpdater completes its first pass and waits.
Then it fires again, and never finishes. I can watch it spin in
Firebug, and it doesn't stop or return a second time until the Updater
does.
Here's how I have it set now:
var updateForm = $('files_update');
if(updateForm){
updateForm.onsubmit = function(){
Element.show('spinner');
if($('progress')) new Ajax.PeriodicalUpdater('progress',
'progress.php', {asynchronous:true, frequency:30});
new Ajax.Updater('results', 'rebuild.php', {
asynchronous:true,
parameters:Form.serialize(this),
onComplete:function(){
Element.hide('spinner');
}
});
return false;
}
}
Any suggestions?
Thanks,
Walter
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---