module Digdag::Client::Attempt

Public Instance Methods

get_attemp_retries(id) click to toggle source
# File lib/digdag_client/client/attempt.rb, line 32
def get_attemp_retries(id)
  get("attempts/#{id}/retries")
end
get_attempt(id) click to toggle source
# File lib/digdag_client/client/attempt.rb, line 24
def get_attempt(id)
  get("attempts/#{id}")
end
get_attempts(params={}) click to toggle source
# File lib/digdag_client/client/attempt.rb, line 6
def get_attempts(params={})

  options = {}
  if params[:include_retried] == 1
    options[:include_retried] = 1
  end

  if params[:project]
    options[:project] = params[:project]
  end

  if params[:workflow]
    options[:workflow] = params[:workflow]
  end

  get("attempts", options)["attempts"]
end
get_tasks_of_attempt(id) click to toggle source
# File lib/digdag_client/client/attempt.rb, line 28
def get_tasks_of_attempt(id)
  get("attempts/#{id}/tasks")["tasks"]
end
kill_attempt(id) click to toggle source
# File lib/digdag_client/client/attempt.rb, line 47
def kill_attempt(id)
  post("attempts/#{id}/kill")
end
start_attempt(params={}) click to toggle source
# File lib/digdag_client/client/attempt.rb, line 36
def start_attempt(params={})
  options = {}
  options[:params] = params[:params]
  if params[:sessionTime].is_a?(Time)
    options[:sessionTime] = params[:sessionTime].iso8601
  end

  options[:workflowId] = params[:workflowId]
  put("attempts", options)
end