Provides Public API of Qchan.
Qchan is a project of a Job-Queue Worker System. It consists of a cluster of many processes and Qchan API is a member of them. Qchan API has a responsibility to provide Public REST API to the Qchan's internal processes and the other external clients via HTTP.
Qchan API manages the 3 types of resources: Job & Build & Subscription.
Job is minimal managable unit for tasks in Qchan system. A Job has the following properties:
name | type | description |
---|---|---|
id | integer | the Job ID, unique in the all Jobs in the Qchan system |
|id (integer): the Job ID, unique in the all Jobs in the Qchan system
- children_ids (array of integer): an array of the following Job IDs
- command (text): the actual shell-script that will be executed by Qchan's worker
- succeess_count (integer): count of successes
- failure_count (integer): count of failures
- name (string): human-readable name
- schedule (string): the scheduling for the job, in ISO8601 format like
R10/2012-10-01T05:52:00Z/PT2S
- 1st segment: number of times to repeat the job; put just 'R' to repeat forever
- 2nd segment: the start time of the job
- 3rd segment: the run interval
Build is created for each execution of the Job, so we might say that there exists a relationship of "A Job has many Builds and a Build belongs to a Job". A Build has the following properties:
- id (integer): the Build ID, unique in the all Builds in the Qchan system
- exit_status (integer): the exit status of the build
- job_id (integer): related Job's ID
- number (integer): counting number, auto-incremented from 1 for each build of its job
- output (text): stdout + stdout of the build
Subscription is a unit of registrations to the Qchan system's pub-sub workers. A Subscription has the following properties:
- id (integer): the Subscription ID, unique in the all Subscriptions in the Qchan system
- type (string): a string property to identifier its event type