Class: QuickbooksPollJob

Inherits:
ApplicationJob show all
Defined in:
app/jobs/quickbooks_poll_job.rb

Overview

QuickbooksPollJob orchestrates the polling of data from QuickBooks Online

This job is the main entry point for synchronizing data from QuickBooks. It handles two primary tasks:

  1. Polling all customers for each company integrated with QuickBooks

  2. Polling invoices for customers with active EDI partner profiles

This job is typically scheduled to run periodically to keep data in sync.

Example usage:

# Schedule the job to run once per hour
QuickbooksPollJob.set(wait: 1.hour).perform_later

# Or run immediately
QuickbooksPollJob.perform_later

Instance Method Summary collapse

Instance Method Details

#performvoid

This method returns an undefined value.

Performs the QuickBooks polling operations

Triggers both customer polling and invoice polling for all companies that have QuickBooks integrations.



27
28
29
30
# File 'app/jobs/quickbooks_poll_job.rb', line 27

def perform
  poll_companies_customers
  poll_customers_invoices
end