public static function shouldDeleteLockObject(BatchJob $batchJob, PropelPDO $con = null) { if ($batchJob->getBatchJobLock() === null) { return false; } if (in_array($batchJob->getStatus(), BatchJobLockPeer::getSchedulingRequiredStatusList())) { return false; } return true; }