Merge branch '2756-eventbus-in-workbench' into 2678-owned_by
authorradhika <radhika@curoverse.com>
Tue, 27 May 2014 20:20:57 +0000 (16:20 -0400)
committerradhika <radhika@curoverse.com>
Tue, 27 May 2014 20:20:57 +0000 (16:20 -0400)
Conflicts:
services/api/script/crunch-dispatch.rb

1  2 
services/api/script/crunch-dispatch.rb

index 88ed689f44690e8ee4257be6ee0d117032afe265,c8d97d937678e328decc304d11b2e2c70e567e5f..a9b75982036669471f7ee1c8cdb05879aa315a37
@@@ -391,13 -397,13 +397,14 @@@ class Dispatche
  
    # send message to log table. we want these records to be transient
    def write_log running_job
-       if (running_job && running_job[:stderr_buf] != '')
+     begin
+       if (running_job && running_job[:stderr_buf_to_flush] != '')
          log = Log.new(object_uuid: running_job[:job].uuid,
                        event_type: 'stderr',
-                       properties: {"text" => running_job[:stderr_buf]})
 +                      owner_uuid: running_job[:job].owner_uuid,
+                       properties: {"text" => running_job[:stderr_buf_to_flush]})
          log.save!
-         running_job[:stderr_buf] = ''
+         running_job[:stderr_buf_to_flush] = ''
          running_job[:stderr_flushed_at] = Time.now.to_i
        end
      rescue