Module: Api2Convert::JobStatus
- Defined in:
- lib/api2convert/job_status.rb
Overview
Well-known job status codes (the status.code field).
The API may introduce further codes; treat any code not listed here as non-terminal. Use JobStatus.terminal? for a raw status string rather than comparing by hand.
Constant Summary collapse
- CREATED =
"created"- INCOMPLETE =
"incomplete"- DOWNLOADING =
"downloading"- QUEUED =
"queued"- PROCESSING =
"processing"- COMPLETED =
"completed"- FAILED =
"failed"- CANCELED =
"canceled"- TERMINAL =
The finished states — a job in one of these will not change further.
[COMPLETED, FAILED, CANCELED].freeze
Class Method Summary collapse
-
.terminal?(code) ⇒ Boolean
Is the given raw status code terminal? Unknown codes are non-terminal.
Class Method Details
.terminal?(code) ⇒ Boolean
Is the given raw status code terminal? Unknown codes are non-terminal.
25 26 27 |
# File 'lib/api2convert/job_status.rb', line 25 def terminal?(code) TERMINAL.include?(code) end |