1
0
مراية لـ https://github.com/postalserver/postal.git تم المزامنة 2026-03-04 14:54:08 +00:00

callbacks for catching errors on the worker

هذا الالتزام موجود في:
Adam Cooke
2017-06-02 14:25:25 +01:00
الأصل 97f95fe831
التزام 9f4568e81a
2 ملفات معدلة مع 14 إضافات و3 حذوفات

عرض الملف

@@ -5,6 +5,7 @@ module Postal
def initialize(id, params = {})
@id = id
@params = params.with_indifferent_access
on_initialize
end
def id
@@ -15,6 +16,15 @@ module Postal
@params || {}
end
def on_initialize
# Called whenever the class is initialized. Can be overriden.
end
def on_error(exception)
# Called if there's an exception while processing the perform block.
# Receives the exception.
end
def perform
end