Sha256: 8a1a036058c8affae7a2010c7979c5ce1e7d5bc17c5a9fc661ad6411d3a88eda
Contents?: true
Size: 597 Bytes
Versions: 9
Compression:
Stored size: 597 Bytes
Contents
module Writefully module Workers class Journalist < BaseWorker def publish Writefully.logger.info "Publishing #{message[:resource]} #{message[:slug]}" pencil = Tools::Pencil.new_link(message) pencil.perform end def remove Writefully.logger.info "Removing #{message[:resource]} #{message[:slug]}" end def message_with_tries message.merge({ tries: (message[:tries] || 1) + 1, run: false }) end def on_death actor, reason Writefully.add_job :journalists, message_with_tries end end end end
Version data entries
9 entries across 9 versions & 1 rubygems