[MTOS-dev] Background Task Change

Byrne Reese byrne at sixapart.com
Sat Feb 9 13:08:52 PST 2008


But would this would run all tasks in the queue, or just the tasks that have
accumulated for this specific request lifecycle?


On 2/8/08 2:01 PM, "Reed A. Cartwright" <reed at scit.us> wrote:

>> 
>> Does that make sense?
> 
> Yeah, it makes a lot of sense.
> 
> Here is the periodic tasks magic in my code:
> 
> while (my $q = new CGI::Fast) {
>      # Skipping code
>      $CGI::Fast::Ext_Request->Finish();
>      if($run_periodic)
>      {  
>          $schwartz = MT::TheSchwartz->new() unless($schwartz);
>          $app->run_tasks();
>          $schwartz->work_until_done();
>      }
>      # Skipping code
> }
> 
> The full script is here:
> http://scit.us/cgi-bin/csvn/misc/mt-dispatch/current/mt-dispatch.fcgi



More information about the MTOS-dev mailing list