pauseProcessing() public method

Signal handler callback for USR2, pauses processing of new jobs.
public pauseProcessing ( )
Example #1
0
 public function testResumedWorkerPicksUpJobs()
 {
     $worker = new Resque_Worker('*');
     $worker->pauseProcessing();
     Resque::enqueue('jobs', 'Test_Job');
     $worker->work(0);
     $this->assertEquals(0, Resque_Stat::get('processed'));
     $worker->unPauseProcessing();
     $worker->work(0);
     $this->assertEquals(1, Resque_Stat::get('processed'));
 }