@@ -37,6 +37,9 @@ abstract class AbstractScheduler implements Scheduler
3737 */
3838 protected TimeBaseForDueDateCalculation $ timeBaseForDueDateCalculation ;
3939
40+ #[Flow \InjectConfiguration(path: 'staleJobTimeout ' )]
41+ protected int $ staleJobTimeoutSecs ;
42+
4043 protected const CLAIM_QUERY = "" ;
4144 protected const SELECT_QUERY = "" ;
4245 protected const RELEASE_QUERY = "" ;
@@ -280,16 +283,15 @@ public function activity(ScheduledJob $job): void
280283 * Reset stale jobs that have not changed for too long.
281284 *
282285 * @param string $groupName Free jobs in this group only
283- * @param int $minutes Count jobs as stale if their last activity was more than these many minutes ago
284286 * @throws Exception
285287 * @return int Number of freed jobs
286288 */
287- public function resetStaleJobs (string $ groupName, int $ minutes ): int {
289+ public function resetStaleJobs (string $ groupName ): int {
288290 return $ this ->dbal ->executeQuery (
289291 sql: static ::RESET_STALE_JOBS_QUERY ,
290292 params: [
291293 'groupName ' => $ groupName ,
292- 'minutes ' => max ($ minutes , 1 ),
294+ 'seconds ' => max ($ this -> staleJobTimeoutSecs , 1 ),
293295 ],
294296 types: [
295297 'groupName ' => Types::STRING ,
0 commit comments