mirror of
https://github.com/docker/compose.git
synced 2026-11-20 06:59:53 +00:00
jobs: register scheduled jobs on create and up, remove them on down
A job with a schedule is registered through the engine's jobs extension, which fires it on its own clock; create and up register it, up stays re-runnable since Create is idempotent on the spec hash, and a full down removes the jobs. The extension ships disabled by default and cannot be listed, so Compose probes it with a List scoped to the project; when the engine cannot run jobs, up, create and start refuse the project before creating anything, and down ignores the jobs. A job the file no longer declares is reported by up and removed by --remove-orphans, unless its run is in progress. The spec is stable: sorted entries, no volatile labels, services referenced by container name. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Guillaume Lours <glours@users.noreply.github.com>
This commit is contained in:
parent
d86a18edd6
commit
723ce2bf4e
30 changed files with 2105 additions and 101 deletions
|
|
@ -88,6 +88,8 @@ const (
|
|||
// declared hook with the runner container the reconciliation plan
|
||||
// prepared for it.
|
||||
HookIndexLabel = "com.docker.compose.hook-index"
|
||||
// JobLabel allow to track resource related to a compose job
|
||||
JobLabel = "com.docker.compose.job"
|
||||
)
|
||||
|
||||
// ComposeVersion is the compose tool version as declared by label VersionLabel
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue