Sha256: a654326ecaab82067d43b8f7105a4318e048d226746e841aeb701ea4aa419b75
Contents?: true
Size: 456 Bytes
Versions: 3
Compression:
Stored size: 456 Bytes
Contents
# frozen_string_literal: true require 'set' module Delayed module Heartbeat class Plugin < Delayed::Plugin callbacks do |lifecycle| lifecycle.before(:execute) do |worker| @heartbeat = Delayed::Heartbeat::WorkerHeartbeat.new(worker.name) if Delayed::Heartbeat.configuration.enabled? end lifecycle.after(:execute) do |_worker| @heartbeat.stop if @heartbeat end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems