svc-sundial 0.1.0

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

Name Value Description
always always

Always notify when a process completes

on_failure on_failure

Notify when a process fails

on_state_change on_state_change

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

on_state_change_and_failures on_state_change_and_failures

Notify when going from failing to succeeded and on each failure

never never

Never notify

process_overlap_action

Name Value Description
wait wait

The process should wait until the currently running instance finishes

terminate terminate

The currently running process should be killed

process_status

Name Value Description
running running

The process has tasks currently executing

succeeded succeeded

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

failed failed

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

task_status

Name Value Description
submitted submitted

The task has been submitted

runnable runnable

starting starting

pending pending

The task is waiting on compute resources

running running

The task is currently executing or awaiting backoff

failed failed

The task has irrevocably failed

succeeded succeeded

The task has succeeded without serious errors

Interfaces

No interfaces

Models

batch_image_command

Example Json: Minimal | Full

Interfaces: None

Field Type Required? Default Description
image string Yes -

tag string Yes latest

command [string] Yes -

memory integer No -

vCpus integer Yes -

taskRoleArn string Yes -

environment_variables [environment_variable] Yes []

job_queue string No -

Override default job queue, eg: for priority queue or GPU instances queue

continuous_schedule

Example Json: Minimal | Full

Interfaces: None

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

Interfaces: None

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

Interfaces: None

Field Type Required? Default Description
image string Yes -

tag string Yes latest

command [string] Yes -

memory integer No -

cpu integer No -

taskRoleArn string No -

log_paths [string] Yes []

environment_variables [environment_variable] Yes []

email

Example Json: Minimal | Full

Interfaces: None

An email to send notifications to

Field Type Required? Default Description
name string Yes -

email string Yes -

notify_when notification_options Yes on_state_change_and_failures

environment_variable

Example Json: Minimal | Full

Interfaces: None

Field Type Required? Default Description
variable_name string Yes -

value string Yes -

healthcheck

Example Json: Minimal | Full

Interfaces: None

Field Type Required? Default Description
status string Yes -

log_entry

Example Json: Minimal | Full

Interfaces: None

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

Interfaces: None

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

Interfaces: None

Pager Duty integration

Field Type Required? Default Description
service_key string Yes -

num_consecutive_failures integer Yes 1

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

process

Example Json: Minimal | Full

Interfaces: None

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

Interfaces: None

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 Yes wait

notifications [notification] No -

shell_script_command

Example Json: Minimal | Full

Interfaces: None

Field Type Required? Default Description
script string Yes -

environment_variables [environment_variable] No -

task

Example Json: Minimal | Full

Interfaces: None

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

Interfaces: None

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 Yes 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

Interfaces: None

Field Type Required? Default Description
task_definition_name string Yes -

success_required boolean Yes true

Unions

notification

Interfaces: None

  • Type discriminator: N/A
Type Discriminator Value Example Json Description
email email Minimal | Full

pagerduty pagerduty Minimal | Full

process_schedule

Interfaces: None

  • Type discriminator: N/A

A specification for when a process should be run

Type Discriminator Value Example Json Description
cron_schedule cron_schedule Minimal | Full

continuous_schedule continuous_schedule Minimal | Full

task_executable

Interfaces: None

  • Type discriminator: N/A
Type Discriminator Value Example Json Description
docker_image_command docker_image_command Minimal | Full

shell_script_command shell_script_command Minimal | Full

Annotations

No annotations