diff options
author | Christoph Helma <helma@in-silico.ch> | 2012-07-13 12:24:37 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2012-07-13 12:24:37 +0200 |
commit | 66dae77b92308bb09781948ad4caf90b770d1ef8 (patch) | |
tree | 029f0f32cfd4a94922a58229fde3a531f1705ecf /lib/task.rb | |
parent | bf6834445feb6f93f0a20359462dbd1e7e89f4b8 (diff) |
wait for tasks in post/put requests
Diffstat (limited to 'lib/task.rb')
-rw-r--r-- | lib/task.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/task.rb b/lib/task.rb index f3f7f6b..4f446b7 100644 --- a/lib/task.rb +++ b/lib/task.rb @@ -12,7 +12,7 @@ module OpenTox task = Task.new uri, subjectid task[RDF::OT.hasStatus] = "Running" params.each { |k,v| task[k] = v } - task.put + task.put false pid = fork do begin result_uri = yield @@ -61,13 +61,13 @@ module OpenTox def cancel kill self.[]=(RDF::OT.hasStatus, "Cancelled") - put + put false end def completed(uri) self.[]=(RDF::OT.resultURI, uri) self.[]=(RDF::OT.hasStatus, "Completed") - put + put false end # waits for a task, unless time exceeds or state is no longer running |