1 class Job < ArvadosBase
2 def self.goes_in_projects?
10 def attribute_editable? attr, *args
11 if attr.to_sym == :description
12 super && attr.to_sym == :description
24 x = "\"#{script}\" job"
29 x += " finished #{finished_at.strftime('%b %-d')}"
31 x += " started #{started_at.strftime('%b %-d')}"
33 x += " submitted #{created_at.strftime('%b %-d')}"
38 arvados_api_client.api "jobs/#{self.uuid}/", "cancel", {}
42 arvados_api_client.api("jobs/", "queue_size", {"_method"=> "GET"})[:queue_size] rescue 0
46 arvados_api_client.unpack_api_response arvados_api_client.api("jobs/", "queue", {"_method"=> "GET"})
50 if job.respond_to? :state and job.state
54 if not job[:cancelled_at].nil?
56 elsif not job[:finished_at].nil? or not job[:success].nil?
69 def textile_attributes