Class: Notifu::Cleaner

Inherits:
Object show all
Includes:
Util, Sidekiq::Worker
Defined in:
lib/notifu/workers/processor.rb

Instance Method Summary collapse

Methods included from Util

action_log, log, option

Instance Method Details

#perform(notifu_id, delay = 15) ⇒ Object


420
421
422
423
424
425
426
427
428
# File 'lib/notifu/workers/processor.rb', line 420

def perform notifu_id, delay=15
  sleep delay
  begin
    Notifu::Model::Issue.with(:notifu_id, notifu_id).delete
    log "info", "Cleanup NID #{notifu_id} - success"
  rescue NoMethodError
    log "info", "Cleanup NID #{notifu_id} - not found"
  end
end