summaryrefslogtreecommitdiff
path: root/lib/task.rb
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2013-07-16 17:45:08 +0200
committerChristoph Helma <helma@in-silico.ch>2013-07-16 17:45:08 +0200
commit80c1821e3a55b0d9c1ee51537e109dff3bc79423 (patch)
treeb77873e557b016d265c97cbc212b73f700453712 /lib/task.rb
parent10ffab4d032e3e5584c318a45521e774d49bd3d7 (diff)
subjectid handled by RestClientWrapper
Diffstat (limited to 'lib/task.rb')
-rw-r--r--lib/task.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/task.rb b/lib/task.rb
index d642f48..07efc0f 100644
--- a/lib/task.rb
+++ b/lib/task.rb
@@ -10,9 +10,9 @@ module OpenTox
super true # always update metadata
end
- def self.run(description, creator=nil, subjectid=SUBJECTID)
+ def self.run(description, creator=nil)
- task = Task.new nil, subjectid
+ task = Task.new nil
task[RDF::OT.created_at] = DateTime.now
task[RDF::OT.hasStatus] = "Running"
task[RDF::DC.description] = description.to_s
@@ -23,7 +23,7 @@ module OpenTox
task.completed yield
rescue
if $!.respond_to? :to_ntriples
- RestClientWrapper.put(File.join(task.uri,'Error'),{:errorReport => $!.to_ntriples},{:content_type => 'text/plain', :subjectid => task.subjectid})
+ RestClientWrapper.put(File.join(task.uri,'Error'),{:errorReport => $!.to_ntriples},{:content_type => 'text/plain'})
else
cut_index = $!.backtrace.find_index{|line| line.match /gems\/sinatra/}
cut_index = -1 unless cut_index
@@ -41,7 +41,7 @@ module OpenTox
nt = RDF::Writer.for(:ntriples).buffer do |writer|
@rdf.each{|statement| writer << statement}
end
- RestClientWrapper.put(File.join(task.uri,'Error'),{:errorReport => nt},{:content_type => 'text/plain', :subjectid => task.subjectid})
+ RestClientWrapper.put(File.join(task.uri,'Error'),{:errorReport => nt},{:content_type => 'text/plain'})
end
task.kill
end
@@ -107,7 +107,7 @@ module OpenTox
end
def code
- RestClientWrapper.head(@uri,{},:subjectid => @subjectid).code.to_i
+ RestClientWrapper.head(@uri).code.to_i
end
# get only header for status requests