Module: Digdag::Client::Attempt
- Included in:
- Digdag::Client
- Defined in:
- lib/digdag_client/client/attempt.rb
Instance Method Summary collapse
- #get_attemp_retries(id) ⇒ Object
- #get_attempt(id) ⇒ Object
- #get_attempts(params = {}) ⇒ Object
- #get_tasks_of_attempt(id) ⇒ Object
- #kill_attempt(id) ⇒ Object
- #start_attempt(params = {}) ⇒ Object
Instance Method Details
#get_attemp_retries(id) ⇒ Object
32 33 34 |
# File 'lib/digdag_client/client/attempt.rb', line 32 def get_attemp_retries(id) get("attempts/#{id}/retries") end |
#get_attempt(id) ⇒ Object
24 25 26 |
# File 'lib/digdag_client/client/attempt.rb', line 24 def get_attempt(id) get("attempts/#{id}") end |
#get_attempts(params = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/digdag_client/client/attempt.rb', line 6 def get_attempts(params={}) = {} if params[:include_retried] == 1 [:include_retried] = 1 end if params[:project] [:project] = params[:project] end if params[:workflow] [:workflow] = params[:workflow] end get("attempts", )["attempts"] end |
#get_tasks_of_attempt(id) ⇒ Object
28 29 30 |
# File 'lib/digdag_client/client/attempt.rb', line 28 def get_tasks_of_attempt(id) get("attempts/#{id}/tasks")["tasks"] end |
#kill_attempt(id) ⇒ Object
47 48 49 |
# File 'lib/digdag_client/client/attempt.rb', line 47 def kill_attempt(id) post("attempts/#{id}/kill") end |
#start_attempt(params = {}) ⇒ Object
36 37 38 39 40 41 42 43 44 45 |
# File 'lib/digdag_client/client/attempt.rb', line 36 def start_attempt(params={}) = {} [:params] = params[:params] if params[:sessionTime].is_a?(Time) [:sessionTime] = params[:sessionTime].iso8601 end [:workflowId] = params[:workflowId] put("attempts", ) end |