예제 #1
0
파일: Propel.php 프로젝트: apinstein/jqjobs
 private function getJQManagedJobForDbJob($dbJob)
 {
     $mJob = new JQManagedJob($this);
     $mJob->fromArray($dbJob->toArray(BasePeer::TYPE_STUDLYPHPNAME));
     return $mJob;
 }
예제 #2
0
 /**
  * @dataProvider jobIsPastMaxRuntimeSecondsDataProvider
  * @testdox JQManagedJob::isPastMaxRuntimeSeconds()
  */
 function testJobIsPastMaxRuntimeSeconds($maxRuntimeSeconds, $currentStatus, $startDts, $expectedResult)
 {
     $q = $this->jqStore;
     $mJob = new JQManagedJob($q);
     $mJob->fromArray(array('status' => $currentStatus, 'maxRuntimeSeconds' => $maxRuntimeSeconds, 'startDts' => new DateTime($startDts)));
     $this->assertEquals($expectedResult, $mJob->isPastMaxRuntimeSeconds());
 }