From 80c1821e3a55b0d9c1ee51537e109dff3bc79423 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Tue, 16 Jul 2013 17:45:08 +0200 Subject: subjectid handled by RestClientWrapper --- lib/task.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/task.rb') 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 -- cgit v1.2.3