IO-233 Update ARMS trigger & error logging.
This commit is contained in:
@@ -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