Jump to content

ignore_user_abort() should roll downhill, no?


delayedinsanity

Recommended Posts

I maintain an application that requires an aggregate method to run once daily.

 

As of right now it's running under a sudo-cron application and as such is tripped when the site is accessed at or after a certain time (no, it can't be done directly via cron). Since the script needs to be allowed to finish, the primary method it activates sets ignore_user_abort() to true and set_time_limit() to 0.

 

I may have been the cause since I've been checking in and out of svn all day, but despite this I had some data truncated during one of the test runs which is being fired off hourly for debugging. The faulty data is generated during the running of a seperate method which is called by this parent method (the allegedly non-abortable one).

 

Therefore the question is raised, does ignore_user_abort() roll downhill? Any private methods run within the primary method should automatically be covered under the original ignore_user_abort() call should they not, or does the call have to reside in each and every function that's being run?

 

I'm attempting to avoid this fiasco by using an asynchronous http request in the next version of the app, however given the chance that fsockopen could fail I've written it in such a way as to fall back on the original method of running the aggregate. To that end, any information about ignore_user_abort() would be greatly appreciated!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.