Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
User's Guide 06:02 Enterprise: Graceful Termination
This is a feature of TaskBotJS Enterprise.
TaskBotJS and TaskBotJS Pro will requeue any in-flight jobs in the event that the server receives a shutdown signal from its process handler. It's possible, then, that a job will be effectively completed (an email sent, for example) but requeued to be sent again.
The chance of this happening is low. But it's significantly higher in environments with very ephemeral and short-lived systems, such as in continuous deployment environments. If the chance of having a job execute twice is one in a million--well, as noted elsewhere in the wiki, for some people and organizations one in a million is next Tuesday.
TaskBotJS Enterprise offers the ability to enable graceful shutdown. Instead of prioritizing quick shutdown so as to be able to stand back up with a new release, graceful shutdown ensures that all jobs complete before the service terminates. This is particularly useful in environments with flexible deployment logic, such as a rolling-deployment Kubernetes or Capistrano setup; the deployer can wait on one machine to gracefully shut down, then move onto the next, or (if your environment has the CPU and memory headroom) gracefully terminate all instances and spin up new ones simultaneously.
Configuring Graceful Shutdown