مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2026-01-17 21:39:47 +00:00
feat: new background work process
This removes all previous dependencies on RabbitMQ and the need to run separate cron and requeueing processes.
هذا الالتزام موجود في:
14
db/migrate/20240213165450_create_worker_roles.rb
Normal file
14
db/migrate/20240213165450_create_worker_roles.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class CreateWorkerRoles < ActiveRecord::Migration[6.1]
|
||||
|
||||
def change
|
||||
create_table :worker_roles do |t|
|
||||
t.string :role
|
||||
t.string :worker
|
||||
t.datetime :acquired_at
|
||||
t.index :role, unique: true
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
13
db/migrate/20240213171830_create_scheduled_tasks.rb
Normal file
13
db/migrate/20240213171830_create_scheduled_tasks.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class CreateScheduledTasks < ActiveRecord::Migration[6.1]
|
||||
|
||||
def change
|
||||
create_table :scheduled_tasks do |t|
|
||||
t.string :name
|
||||
t.datetime :next_run_after
|
||||
t.index :name, unique: true
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
@@ -0,0 +1,12 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class AddLockFieldsToWebhookRequests < ActiveRecord::Migration[6.1]
|
||||
|
||||
def change
|
||||
add_column :webhook_requests, :locked_by, :string
|
||||
add_column :webhook_requests, :locked_at, :datetime
|
||||
|
||||
add_index :webhook_requests, :locked_by
|
||||
end
|
||||
|
||||
end
|
||||
المرجع في مشكلة جديدة
حظر مستخدم