You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we trigger the job execution with the cron scheduling mechanism of spring.
But then all servers in the cluster start the same job at the same time.
It would be better if edison-jobs checks before starting the job, if the job is already running in the cluster. That could be done by asking the database for any running job of the same type.
We use the mongo-jobs plugin, too. Here the best solution would be to create a unique index which assures, that only one running job of a type can exists. If the creating of the job fails, you know, the job has already started on a different server in the cluster.
In the code I found the following todo, which might be connected to this issue:
JobService:101: // TODO: use some kind of database lock so we can prevent race conditions
The text was updated successfully, but these errors were encountered:
Currently we trigger the job execution with the cron scheduling mechanism of spring.
But then all servers in the cluster start the same job at the same time.
It would be better if edison-jobs checks before starting the job, if the job is already running in the cluster. That could be done by asking the database for any running job of the same type.
We use the mongo-jobs plugin, too. Here the best solution would be to create a unique index which assures, that only one running job of a type can exists. If the creating of the job fails, you know, the job has already started on a different server in the cluster.
In the code I found the following todo, which might be connected to this issue:
JobService:101: // TODO: use some kind of database lock so we can prevent race conditions
The text was updated successfully, but these errors were encountered: