Sha256: 3c6f7992f1ebb692c27f40154342921eed80d1caf02de8d66123bb10c941c978

Contents?: true

Size: 713 Bytes

Versions: 23

Compression:

Stored size: 713 Bytes

Contents

class BackgroundPrinterJob < OxJob
  queue_as :printing

  #  [#<PrintJob id: 28, account_id: 1, printer_id: 7, printed_by_id: 1, printed_by_type: "User", view_template_path: "/record.html.haml",
  #   name: "Account print at 13-10-2015", printing_class: "Account", print_driver: "pdf", print_format: "sheet", state: "drafted",
  #   paper: "A4", copies: 1, print_sql: "SELECT `accounts`.* FROM `accounts` WHERE (`accoun...", created_at: "2015-10-13 14:19:10",
  #   updated_at: "2015-10-13 14:19:10">, {:queue=>"printing", :account_id=>1}, {:account_id=>1}
  #  ]
  def perform job, *args
    job.update_column :state, I18n.t( "#{job.class.to_s.underscore.pluralize}.performing")
    job.perform args
  end

end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
oxen_printer-0.2.4 app/jobs/background_printer_job.rb
oxen_printer-0.2.1 app/jobs/background_printer_job.rb
oxen_printer-0.0.3 app/jobs/background_printer_job.rb