Class: RogIQ::Remote::Jobs
- Inherits:
-
CommandBase
- Object
- Thor
- CommandBase
- RogIQ::Remote::Jobs
- Defined in:
- lib/rogiq/remote/jobs.rb
Instance Method Summary collapse
Instance Method Details
#detail(id) ⇒ Object
24 25 26 |
# File 'lib/rogiq/remote/jobs.rb', line 24 def detail(id) emit(api.get("/api/v1/cli/jobs/detail/#{seg(id)}")) end |
#discard_one(id) ⇒ Object
37 38 39 40 41 42 43 |
# File 'lib/rogiq/remote/jobs.rb', line 37 def discard_one(id) unless [:yes] exit 1 unless yes?("Discard failed execution #{id}?") end emit(api.post("/api/v1/cli/jobs/discard/#{seg(id)}", { confirm: true })) end |
#list ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/rogiq/remote/jobs.rb', line 14 def list q = {} q[:failed] = true if [:failed] q[:class_name] = [:class] unless [:class].to_s.strip.empty? q[:limit] = [:limit] if [:failed] emit(api.get("/api/v1/cli/jobs/list", q)) end |
#retry_job(id) ⇒ Object
30 31 32 |
# File 'lib/rogiq/remote/jobs.rb', line 30 def retry_job(id) emit(api.post("/api/v1/cli/jobs/retry/#{seg(id)}")) end |