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!

I should have supplied an example, sorry -- however that's exactly what I was referring to. Good to know, that means the fault earlier today must have been between keyboard and chair, as it's been running smooth ever since.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.