Reputation: 849
I have Quickbooks Webconnector connected to a standard CodeIgniter Webconnector Class Queue.
The problem: It has been pulling CustomerAdds out of the queue before SalesOrderAdds but something changed and now it is ordering what comes out of the queue differently so that the SalesOrderAdds are being pulled out first.
The question: Is there a way to dictate what order items are pulled out of the Queue by the WebConnector?
You probably need more information than that but I'm not sure what. Let me know and I will provide it.
Upvotes: 0
Views: 391
Reputation: 27962
The question: Is there a way to dictate what order items are pulled out of the Queue by the WebConnector?
Assuming you're using this open-source QuickBooks integration code from GitHub:
You should be aware that the queue is a priority queue so you can specify the priority of things that run. Higher priorities run first.
Specifically if you do this:
// Queue up the customer with a priority of 10
$Queue->enqueue(QUICKBOOKS_ADD_CUSTOMER, $customer_id, 10);
// Queue up the sales order with a priority of 5
$Queue->enqueue(QUICKBOOKS_ADD_SALESORDER, $salesorder_id, 5);
Because higher priorities run first, that guarantees that the CustomerAdd
(priority=10
) will occur prior to the SalesOrderAdd
(priority=5
, which is lower than the CustomerAdd
).
Upvotes: 1