Delete obsolete pending delayed jobs related to the deleted account invoices feature

This commit is contained in:
luisramos0
2019-03-20 11:22:33 +00:00
parent 78d7222364
commit 804375d1aa
2 changed files with 10 additions and 1 deletions

View File

@@ -0,0 +1,9 @@
class DeleteObsoletePendingJobs < ActiveRecord::Migration
def up
Delayed::Job.all.each do |job|
job.delete if job.name == "FinalizeAccountInvoices" ||
job.name == "UpdateAccountInvoices" ||
job.name == "UpdateBillablePeriods"
end
end
end

View File

@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20190315224423) do
ActiveRecord::Schema.define(:version => 20190320111312) do
create_table "adjustment_metadata", :force => true do |t|
t.integer "adjustment_id"