Skip to content

Queue Termination Policy

Vladislav Alekseev edited this page Jun 9, 2020 · 2 revisions

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:

stayAlive

{
    "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.

afterBeingIdle

{
    "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.

Clone this wiki locally