-
Notifications
You must be signed in to change notification settings - Fork 28
Queue Termination Policy
Defines when queue will terminate itself. Useful if you are updating Emcee on your CI. The previous version of Emcee queue will eventually terminate itself if termination policy is configured to do so.
The following values are supported:
{
"queueServerTerminationPolicy": {
"caseId": "stayAlive"
}
}
In this mode, Emcee queue server (and its workers) will not terminate automatically at all.
Usually it does not make sense to use this policy.
{
"queueServerTerminationPolicy": {
"caseId": "after",
"period": 600
}
}
In this mode, Emcee queue server will stop accepting new jobs after the given period of time (600 seconds in this example). Then it will finish all ongoing jobs and terminate itself.
{
"queueServerTerminationPolicy": {
"caseId": "afterBeingIdle",
"period": 600
}
}
In this mode, Emcee queue server will stop accepting new jobs after being unused for the given period of time (600 seconds in this example). "Being used" means:
-
Workers send back test execution results (
/bucketResult
request) -
Deleting job from the queue (
/jobDelete
request) -
Fetching job results from the queue (
/jobResults
request) -
Worker registration event (
/registerWorker
request) -
Scheduling tests/creating new job event (
/scheduleTests
request)
Being unused means none of the events above happen for the given period of time. After being unused for long enough, queue will stop accepting new jobs. It will finish all ongoing jobs and then terminate itself.