مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2026-01-22 07:38:18 +00:00
feat: new background work process
This removes all previous dependencies on RabbitMQ and the need to run separate cron and requeueing processes.
هذا الالتزام موجود في:
29
lib/worker/jobs/base_job.rb
Normal file
29
lib/worker/jobs/base_job.rb
Normal file
@@ -0,0 +1,29 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Worker
|
||||
module Jobs
|
||||
class BaseJob
|
||||
|
||||
def initialize(logger:)
|
||||
@logger = logger
|
||||
end
|
||||
|
||||
def call
|
||||
# Override me.
|
||||
end
|
||||
|
||||
def work_completed?
|
||||
@work_completed == true
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def work_completed!
|
||||
@work_completed = true
|
||||
end
|
||||
|
||||
attr_reader :logger
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
المرجع في مشكلة جديدة
حظر مستخدم