INNER CODE UNIT · Ruby

duration

reidmorrison/rocketjob · lib/rocket_job/active_worker.rb:44

    def duration
      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)
    end

    # Returns [String] the name of the server running this worker
    def server_name
      if (match = name.to_s.match(/(.*:.*):.*/))
        match[1]
      else
        name
      end
    end

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…