Skip to content

Commit 42fba97

Browse files
MAGETWO-69629: Locking all cronjobs with the same job code
1 parent 32d399e commit 42fba97

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/code/Magento/Cron/Model/Schedule.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,12 +221,12 @@ public function getNumeric($value)
221221
}
222222

223223
/**
224+
* Lock the cron job so no other scheduled instances run simultaneously.
225+
*
224226
* Sets a job to STATUS_RUNNING only if it is currently in STATUS_PENDING
225227
* and no other jobs of the same code are currently in STATUS_RUNNING.
226228
* Returns true if status was changed and false otherwise.
227229
*
228-
* This is used to implement locking for cron jobs.
229-
*
230230
* @return boolean
231231
*/
232232
public function tryLockJob()

0 commit comments

Comments
 (0)