Skip to content

Commit

Permalink
Tweak indexes in blocked_executions table
Browse files Browse the repository at this point in the history
  • Loading branch information
rosa committed Nov 7, 2023
1 parent 8e87147 commit 1b66602
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ def change
t.integer :priority, default: 0, null: false

t.integer :concurrency_limit, null: false
t.string :concurrency_key, null: false, index: true
t.string :concurrency_key, null: false

t.datetime :created_at, null: false

t.index [ :concurrency_key, :priority ]
t.index [ :queue_name, :concurrency_key ]
end

create_table :solid_queue_semaphores do |t|
Expand Down
5 changes: 4 additions & 1 deletion test/dummy/db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@
t.integer "concurrency_limit", null: false
t.string "concurrency_key", null: false
t.datetime "created_at", null: false
t.index ["concurrency_key"], name: "index_solid_queue_blocked_executions_on_concurrency_key"
t.index ["concurrency_key", "priority"], name: "idx_on_concurrency_key_priority_1d18ad1bbb"
t.index ["job_id"], name: "index_solid_queue_blocked_executions_on_job_id", unique: true
t.index ["queue_name", "concurrency_key"], name: "idx_on_queue_name_concurrency_key_6fea8d37ab"
end

create_table "solid_queue_claimed_executions", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
Expand Down Expand Up @@ -82,6 +83,8 @@
t.string "queue_name", null: false
t.integer "priority", default: 0, null: false
t.datetime "created_at", null: false
t.string "concurrency_key"
t.index ["concurrency_key"], name: "index_solid_queue_ready_executions_on_concurrency_key"
t.index ["job_id"], name: "index_solid_queue_ready_executions_on_job_id", unique: true
t.index ["priority"], name: "index_solid_queue_ready_executions_on_priority"
t.index ["queue_name", "priority"], name: "index_solid_queue_ready_executions"
Expand Down

0 comments on commit 1b66602

Please sign in to comment.