#!/usr/bin/env ruby require_relative "../config/environment" Outboxer::Publisher.publish do |args| logger = args.logger message = args.message logger.info("[#{message.id}] publishing") HardJob.perform_async({ "message_id" => message.id }) logger.info("[#{message.id}] published") end