lib/rocket_job/active_worker.rb in rocketjob-3.0.0.rc4 vs lib/rocket_job/active_worker.rb in rocketjob-3.0.0.rc5
- old
+ new
@@ -43,10 +43,10 @@
RocketJob.seconds_as_duration(duration_s)
end
# Number of seconds this server has been working on this job / slice
def duration_s
- Time.now - started_at
+ Time.now - (started_at || Time.now)
end
# Returns [String] the name of the server running this worker
def server_name
if match = name.match(/(.*:.*):.*/)