mirror of
https://github.com/coder/coder.git
synced 2026-10-28 02:42:54 +08:00
This PR adds a package lifecycle and an Executor implementation that attempts to schedule a build of workspaces with autostart configured. - lifecycle.Executor takes a chan time.Time in its constructor (e.g. time.Tick(time.Minute)) - Whenever a value is received from this channel, it executes one iteration of looping through the workspaces and triggering lifecycle operations. - When the context passed to the executor is Done, it exits. - Only workspaces that meet the following criteria will have a lifecycle operation applied to them: - Workspace has a valid and non-empty autostart or autostop schedule (either) - Workspace's last build was successful - The following transitions will be applied depending on the current workspace state: - If the workspace is currently running, it will be stopped. - If the workspace is currently stopped, it will be started. - Otherwise, nothing will be done. - Workspace builds will be created with the same parameters and template version as the last successful build (for example, template version)
22 lines
479 B
Plaintext
22 lines
479 B
Plaintext
###############################################################################
|
|
# COPY PASTA OF .gitignore
|
|
# https://github.com/prettier/prettier/issues/8048
|
|
# https://github.com/prettier/prettier/issues/8506
|
|
# https://github.com/prettier/prettier/issues/8679
|
|
###############################################################################
|
|
|
|
node_modules
|
|
vendor
|
|
.eslintcache
|
|
yarn-error.log
|
|
.idea
|
|
|
|
# Front-end ignore
|
|
.next/
|
|
coverage/
|
|
out/
|
|
storybook-static/
|
|
test-results/
|
|
|
|
**/*.swp
|