Skip to main content

Graceful delegate shutdown

Harness Delegate is designed to shut down gracefully. The process of graceful delegate shutdown is as follows:

  • The delegate receives an instruction to quit.
  • A grace period begins during which the delegate:
    • Stops accepting new tasks.
    • Works to complete running tasks.
  • The grace period ends.
  • Delegates that have not quit are force-terminated.
  • Incomplete tasks are discarded.

The length of the grace period is configurable.

Delegate typeGrace periodDefault interval
Immutable imageYes10 minutes
Legacy imageNo30 seconds

The event that initiates the graceful shutdown depends on delegate type.

Delegate environmentTrigger
KubernetesPod termination, eviction, or user-initiated scaling
Dockerdocker kill command
Shell./ instruction