Skip to content

Commit

Permalink
Add missing queue attribute/column to delayed_jobs model/table, respe…
Browse files Browse the repository at this point in the history
…ctively.

delayed_job 3.0.2 has provision for this attribute. delayed_job 3.0.5
specifies a default, and therefore fails without this attribute being
declared in the model.

Missing attribute and column was a bug.

I cannot tell if delayed_job 3.0.2 actually functioned without this
column in the database, especially if no queues were declared.

This commit does not add the column to existing databases, on assumption
that the installed pool using this configuration is small, the change
is easy to make on any given dbms and difficult to implement in a
generic fashion.

Further discussion can be found in integrity#221.
  • Loading branch information
p committed Mar 13, 2013
1 parent 0a8e030 commit a766525
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGES
@@ -1,5 +1,9 @@
= master

* delayed_jobs table was missing queue column, of type string.
This column will be added in new installations. Existing installations
must add it to the schema manually.

* Notifo notifier was removed, because notifo service had been retired.

* Website sources are back in main Integrity repository.
Expand Down
1 change: 1 addition & 0 deletions lib/integrity/builders/delayed_builder.rb
Expand Up @@ -13,6 +13,7 @@ def initialize(options)
unless Delayed::Job.table_exists?
ActiveRecord::Schema.define {
create_table :delayed_jobs, :force => true do |table|
table.string :queue
table.integer :priority, :default => 0
table.integer :attempts, :default => 0
table.text :handler
Expand Down

0 comments on commit a766525

Please sign in to comment.