.

CleanupSchedulerBaseCommand Class Reference

Find tasks that have crashed and treat them as failed. More...

Inheritance diagram for CleanupSchedulerBaseCommand:
ProcessSchedulerCommand ProcessSchedulerBaseCommand CommandChain CommandBase ICommand IAction ISerializable CleanupSchedulerCommand

List of all members.

Public Member Functions

  get_description ()
  Returns a description of this command.
  get_name ()
  Returns title of command.

Protected Member Functions

  do_execute ()
  Does processing.

Detailed Description

Find tasks that have crashed and treat them as failed.

Author:
Gerd Riesselmann

Definition at line 9 of file cleanupscheduler.cmd.php.


Member Function Documentation

CleanupSchedulerBaseCommand::do_execute (  )  [protected]

Does processing.

Reimplemented from ProcessSchedulerBaseCommand.

Definition at line 13 of file cleanupscheduler.cmd.php.

00013                                         {
00014                 $ret = new Status();
00015                 
00016                 $tasks = new DAOScheduler();
00017                 $tasks->status = Scheduler::STATUS_PROCESSING;
00018                 $tasks->add_where('scheduledate', '<', time() - 2 * GyroDate::ONE_HOUR);
00019                 $tasks->find();
00020                 $err = new Status(tr('Task has crashed, possible out of memory or time', 'scheduler'));
00021                 while ($tasks->fetch()) {
00022                         $ret->merge($this->on_error(clone($tasks), $err));
00023                         if ($ret->is_error()) {
00024                                 break;
00025                         }       
00026                 }
00027                 return $ret;
00028         } 
CleanupSchedulerBaseCommand::get_description (  ) 

Returns a description of this command.

Reimplemented from ProcessSchedulerBaseCommand.

Definition at line 40 of file cleanupscheduler.cmd.php.

00040                                           {
00041                 return tr('Cleanup', 'scheduler');      
00042         }       
CleanupSchedulerBaseCommand::get_name (  ) 

Returns title of command.

Reimplemented from ProcessSchedulerBaseCommand.

Definition at line 33 of file cleanupscheduler.cmd.php.

00033                                    {
00034                 return 'cleanup';
00035         }

The documentation for this class was generated from the following file: