1
0
مراية لـ https://github.com/postalserver/postal.git تم المزامنة 2025-11-30 21:32:30 +00:00

feat: new background work process

This removes all previous dependencies on RabbitMQ and the need to run separate cron and requeueing processes.
هذا الالتزام موجود في:
Adam Cooke
2024-02-14 13:46:04 +00:00
ملتزم من قبل Adam Cooke
الأصل 044058d0f1
التزام dc8e895bfe
69 ملفات معدلة مع 1675 إضافات و1186 حذوفات

عرض الملف

@@ -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

عرض الملف

@@ -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

عرض الملف

@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2024_02_06_173036) do
ActiveRecord::Schema.define(version: 2024_02_14_132253) do
create_table "additional_route_endpoints", id: :integer, charset: "utf8mb4", collation: "utf8mb4_general_ci", force: :cascade do |t|
t.integer "route_id"
@@ -213,6 +213,12 @@ ActiveRecord::Schema.define(version: 2024_02_06_173036) do
t.index ["token"], name: "index_routes_on_token", length: 6
end
create_table "scheduled_tasks", charset: "utf8mb4", collation: "utf8mb4_general_ci", force: :cascade do |t|
t.string "name"
t.datetime "next_run_after"
t.index ["name"], name: "index_scheduled_tasks_on_name", unique: true
end
create_table "servers", id: :integer, charset: "utf8mb4", collation: "utf8mb4_general_ci", force: :cascade do |t|
t.integer "organization_id"
t.string "uuid"
@@ -343,6 +349,9 @@ ActiveRecord::Schema.define(version: 2024_02_06_173036) do
t.datetime "retry_after", precision: 6
t.text "error"
t.datetime "created_at", precision: 6
t.string "locked_by"
t.datetime "locked_at"
t.index ["locked_by"], name: "index_webhook_requests_on_locked_by"
end
create_table "webhooks", id: :integer, charset: "utf8mb4", collation: "utf8mb4_general_ci", force: :cascade do |t|
@@ -359,4 +368,11 @@ ActiveRecord::Schema.define(version: 2024_02_06_173036) do
t.index ["server_id"], name: "index_webhooks_on_server_id"
end
create_table "worker_roles", charset: "utf8mb4", collation: "utf8mb4_general_ci", force: :cascade do |t|
t.string "role"
t.string "worker"
t.datetime "acquired_at"
t.index ["role"], name: "index_worker_roles_on_role", unique: true
end
end