svc-sundial 0.0.12

A service for scheduling and running Docker-based jobs

  • Contact: N/A
  • License: N/A

Resources

healthcheck

Operations

Method and Path Description
GET /_internal_/metrics

process

Operations

Method and Path Description
GET /api/processes/

Retrieves a list of process runs based on search parameters.

GET /api/processes/:process_id

Retrieves a process run

POST /api/processes/:process_id/retry

Retries a failed process run by restarting failed tasks; tasks will be given a single additional attempt

POST /api/processes/:process_id/kill

Terminates an active process

process_definition

Operations

Method and Path Description
GET /api/process_definitions/

Get all currently registered process definitions

GET /api/process_definitions/:process_definition_name

Get a registered process definition

PUT /api/process_definitions/:process_definition_name

Updates or creates a process definition

DELETE /api/process_definitions/:process_definition_name

Deletes a registered process definition

POST /api/process_definitions/:process_definition_name/trigger

Triggers a new instance of the process

POST /api/process_definitions/:process_definition_name/pause

Pause the process schedule

POST /api/process_definitions/:process_definition_name/resume

Resume the process schedule

task

Operations

Method and Path Description
GET /api/tasks/

Retrieves the most recent tasks meeting the given criteria

POST /api/tasks/:task_id/log_entries

Appends log entries for a task; intended for use within the task executable

POST /api/tasks/:task_id/metadata

Appends metadata entries for a task; intended for use within the task executable

POST /api/tasks/:task_id/succeed

Marks the task as having succeeded

POST /api/tasks/:task_id/fail

Marks the task as having failed

Headers

No headers

Imports

No imports

Enums

notification_options

always

Always notify when a process completes

on_failure

Notify when a process fails

on_state_change

Notify when a process goes from succeeding to failing and vica versa

on_state_change_and_failures

Notify when going from failing to succeeded and on each failure

never

Never notify

process_overlap_action

wait

The process should wait until the currently running instance finishes

terminate

The currently running process should be killed

process_status

running

The process has tasks currently executing

succeeded

All of the process’s tasks succeeded on its last run

failed

At least one of the process’s tasks failed on its last run

task_status

running

The task is currently executing or awaiting backoff

failed

The task has irrevocably failed

succeeded

The task has succeeded without serious errors

Models

continuous_schedule

Example Json: Minimal | Full
Field Type Required? Default Description
buffer_seconds integer No -

The minimum amount of time (in seconds) that must pass between executions of the process

cron_schedule

Example Json: Minimal | Full

See http://quartz-scheduler.org/api/2.2.0/org/quartz/CronExpression.html

Field Type Required? Default Description
day_of_week string Yes -

month string Yes -

day_of_month string Yes -

hours string Yes -

minutes string Yes -

docker_image_command

Example Json: Minimal | Full
Field Type Required? Default Description
image string Yes -

tag string No latest

command [string] Yes -

memory integer No -

cpu integer No -

taskRoleArn string No -

log_paths [string] No []

environment_variables [environment_variable] No []

email

Example Json: Minimal | Full

An email to send notifications to

Field Type Required? Default Description
name string Yes -

email string Yes -

notify_when notification_options No on_state_change_and_failures

environment_variable

Example Json: Minimal | Full
Field Type Required? Default Description
variable_name string Yes -

value string Yes -

healthcheck

Example Json: Minimal | Full
Field Type Required? Default Description
status string Yes -

log_entry

Example Json: Minimal | Full
Field Type Required? Default Description
log_entry_id uuid Yes -

Uniquely identifies the log message to prevent duplication

when date-time-iso8601 Yes -

source string Yes -

message string Yes -

metadata_entry

Example Json: Minimal | Full
Field Type Required? Default Description
metadata_entry_id uuid Yes -

Uniquely identifies the metadata entry to prevent duplication

when date-time-iso8601 Yes -

key string Yes -

value string Yes -

pagerduty

Example Json: Minimal | Full

Pager Duty integration

Field Type Required? Default Description
service_key string Yes -

num_consecutive_failures integer No 1

api_url string No https://events.pagerduty.com

process

Example Json: Minimal | Full
Field Type Required? Default Description
process_id uuid Yes -

process_definition_name string Yes -

start_time date-time-iso8601 Yes -

status process_status Yes -

task [task] Yes -

process_definition

Example Json: Minimal | Full

A grouping of related tasks that are run as a single unit on the same schedule

Field Type Required? Default Description
process_definition_name string Yes -

paused boolean No -

If true, ignore schedule and only start process if triggered manually

process_description string No -

schedule process_schedule No -

The schedule that the process runs on; if not specified, the process will only run when triggered manually

task_definitions [task_definition] Yes -

overlap_action process_overlap_action No wait

notifications [notification] No -

shell_script_command

Example Json: Minimal | Full
Field Type Required? Default Description
script string Yes -

environment_variables [environment_variable] No -

task

Example Json: Minimal | Full
Field Type Required? Default Description
task_id uuid Yes -

process_id uuid Yes -

process_definition_name string Yes -

task_definition_name string Yes -

start_time date-time-iso8601 Yes -

end_time date-time-iso8601 No -

previous_attempt_count integer Yes -

log_entries [log_entry] Yes -

metadata_entries [metadata_entry] Yes -

execution_state [metadata_entry] No -

Internal bookkeeping metadata used for task scheduling (e.g. ECS task ID and cluster name)

status task_status Yes -

task_definition

Example Json: Minimal | Full

An individual task that runs as part of a process

Field Type Required? Default Description
task_definition_name string Yes -

The canonical name for this task used by other tasks to identify this task

dependencies [task_dependency] Yes -

The tasks that must have completed prior to this one beginning

executable task_executable Yes -

max_attempts integer Yes -

max_runtime_seconds integer No -

The execution time (for a single attempt) after which the system will kill the task

backoff_base_seconds integer Yes -

backoff_exponent double No 1

require_explicit_success boolean Yes -

If true, the task must explicitly update its status with Sundial in order to succeed.

task_dependency

Example Json: Minimal | Full
Field Type Required? Default Description
task_definition_name string Yes -

success_required boolean No true

Unions

notification

Example Json: Minimal | Full
  • Type discriminator: N/A
email
pagerduty

process_schedule

Example Json: Minimal | Full
  • Type discriminator: N/A

A specification for when a process should be run

cron_schedule
continuous_schedule

task_executable

Example Json: Minimal | Full
  • Type discriminator: N/A
docker_image_command
shell_script_command