Skip to content

Instantly share code, notes, and snippets.

@SnacksOnAPlane
Last active April 19, 2017 17:53
Show Gist options
  • Save SnacksOnAPlane/578730f3de8b5dd8e851cafbe1e7f6f2 to your computer and use it in GitHub Desktop.
Save SnacksOnAPlane/578730f3de8b5dd8e851cafbe1e7f6f2 to your computer and use it in GitHub Desktop.
back_pop_call_invoice_items.rb
Call.where(start_time: 1.month.ago..DateTime.now).each do |call|
unless InvoiceItem.exist?(billable: call)
call.sidekiq(queue: :manual).create_invoice_item
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment