From a766525680f6285d5b8633aa11ee8dbf2b265476 Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Wed, 13 Mar 2013 00:26:18 -0400 Subject: [PATCH] Add missing queue attribute/column to delayed_jobs model/table, respectively. 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 #221. --- CHANGES | 4 ++++ lib/integrity/builders/delayed_builder.rb | 1 + 2 files changed, 5 insertions(+) diff --git a/CHANGES b/CHANGES index 9eea69b3..9da7dc10 100644 --- a/CHANGES +++ b/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. diff --git a/lib/integrity/builders/delayed_builder.rb b/lib/integrity/builders/delayed_builder.rb index 0dca1a91..83fd59c7 100644 --- a/lib/integrity/builders/delayed_builder.rb +++ b/lib/integrity/builders/delayed_builder.rb @@ -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