work() public method

public work ( integer $limit = null, integer $throttle = self::DEFAULT_THROTTLE, integer $time = null, integer $uSleepTime = 5000000, DateInterval $expiry = null )
$limit integer The maximum number of scheduled commands to queue.
$throttle integer The maximum number of scheduled commands to receive at a time.
$time integer The maximum amount of time in seconds to work.
$uSleepTime integer The number of microseconds to usleep between each query to the scheduler.
$expiry DateInterval The expiry interval for an overdue unqueued command.
Example #1
0
 /**
  * @When I run the scheduler worker
  */
 public function iRunTheSchedulerWorker()
 {
     $worker = new SchedulerWorker($this->implementation);
     try {
         $worker->work(null, 100, 0);
     } catch (TimeoutException $e) {
     }
 }