我有Quickbooks Webconnector连接到标准的CodeIgniter Webconnector Class Queue。
问题:在SalesOrderAdds之前,它一直在将CustomerAdds从队列中拉出,但有些事情发生了变化,现在它以不同的方式对队列中的内容进行排序,以便首先拉出SalesOrderAdds。
问题:有没有办法规定 Web 连接器从队列中拉出哪些顺序项目?
您可能需要比这更多的信息,但我不确定是什么。 让我知道,我会提供它。
问题:有没有办法规定 Web 连接器从队列中拉出哪些顺序项目?
假设您使用的是来自 GitHub 的开源 QuickBooks 集成代码:
- https://github.com/consolibyte/quickbooks-php
您应该知道队列是优先级队列,因此您可以指定运行事物的优先级。优先级越高,优先级将首先运行。
- 文档:http://wiki.consolibyte.com/wiki/doku.php/quickbooks_integration_php_consolibyte_webconnector#quickbooks_queueenqueue
具体而言,如果您这样做:
// 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);
因为优先级越高,这就保证了CustomerAdd
(priority=10
(将发生在SalesOrderAdd
(priority=5
,低于CustomerAdd
(之前。