IO-233 Update ARMS trigger & error logging.
This commit is contained in:
@@ -3767,8 +3767,6 @@
|
||||
- name: jobs_arms
|
||||
definition:
|
||||
enable_manual: false
|
||||
insert:
|
||||
columns: '*'
|
||||
update:
|
||||
columns:
|
||||
- actual_delivery
|
||||
@@ -3776,9 +3774,9 @@
|
||||
- scheduled_completion
|
||||
- actual_completion
|
||||
- date_scheduled
|
||||
- inproduction
|
||||
- clm_total
|
||||
- suspended
|
||||
- date_open
|
||||
- job_totals
|
||||
- converted
|
||||
- employee_body
|
||||
|
||||
@@ -42,8 +42,8 @@ function pollFunc(fn, timeout, interval) {
|
||||
pollFunc(getEntegralShopData, 0, 5 * 60 * 1000); //Set the metadata to refresh every 5 minutes.
|
||||
|
||||
async function getEntegralShopData() {
|
||||
const { bodyshops } = await client.request(queries.GET_ENTEGRAL_SHOPS);
|
||||
await storage.init({ logging: true });
|
||||
const { bodyshops } = await client.request(queries.GET_ENTEGRAL_SHOPS);
|
||||
logger.log("set-entegral-shops-local-storage", "DEBUG", "API", null, null);
|
||||
await storage.setItem("entegralShops", bodyshops);
|
||||
return true; //Continue execution.
|
||||
@@ -872,6 +872,7 @@ exports.default = async (req, res) => {
|
||||
} catch (error) {
|
||||
logger.log("arms-failed-job", "ERROR", "api", job.shopid, {
|
||||
job: JSON.stringify({ id: job.id, ro_number: job.ro_number }),
|
||||
error: JSON.stringify(error),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user