cartodb-4.42/lib/resque_failure_logger.rb
2024-04-06 05:25:13 +00:00

20 lines
423 B
Ruby

# TODO: move to Carto::Common::JobLogger
class ResqueFailureLogger < Resque::Failure::Base
include ::LoggerHelper
def save
log_error(
message: 'Job failed',
component: 'cartodb.resque',
exception: exception,
worker: { pid: worker.pid, hostname: worker.hostname },
job_class: payload['class'],
args: payload['args'].inspect,
run_at: worker.job["run_at"]
)
end
end