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 13, 2023
1 parent 027d117 commit 9823c32
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 ], name: "index_solid_queue_blocked_executions_for_release"
t.index [ :queue_name, :concurrency_key ], name: "index_solid_queue_blocked_executions_for_polling"
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: "index_solid_queue_blocked_executions_for_release"
t.index ["job_id"], name: "index_solid_queue_blocked_executions_on_job_id", unique: true
t.index ["queue_name", "concurrency_key"], name: "index_solid_queue_blocked_executions_for_polling"
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 9823c32

Please sign in to comment.