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