app/cyclid/plugins/dispatcher/local.rb in cyclid-0.2.1 vs app/cyclid/plugins/dispatcher/local.rb in cyclid-0.2.2
- old
+ new
@@ -101,29 +101,29 @@
def status=(status)
@job_record.status = status
@job_record.save!
# Ping the callback status_changed hook, if required
- @callback.status_changed(@job_id, status) if @callback
+ @callback&.status_changed(@job_id, status)
end
# Set the JobRecord ended
def ended=(time)
@job_record.ended = time
@job_record.save!
end
# Ping the callback completion hook, if required
def completion(success)
- @callback.completion(@job_id, success) if @callback
+ @callback&.completion(@job_id, success)
end
# Write data to the log buffer
def write(data)
@log_buffer.write data
# Ping the callback log_write hook, if required
- @callback.log_write(@job_id, data) if @callback
+ @callback&.log_write(@job_id, data)
end
end
end
# Namespace for any asyncronous workers