UNPKG

@hotmeshio/hotmesh

Version:

Serverless Workflow

1 lines 1.76 kB
'use strict';const j=b;(function(c,d){const i=b,e=c();while(!![]){try{const f=-parseInt(i(0x1d5))/0x1+-parseInt(i(0x1e3))/0x2*(-parseInt(i(0x1cc))/0x3)+parseInt(i(0x1df))/0x4*(-parseInt(i(0x1d1))/0x5)+parseInt(i(0x1e5))/0x6+parseInt(i(0x1da))/0x7*(-parseInt(i(0x1cd))/0x8)+parseInt(i(0x1e7))/0x9*(-parseInt(i(0x1ce))/0xa)+parseInt(i(0x1d4))/0xb;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x993b4));function a(){const l=['next','HMSH_FIDELITY_SECONDS','parseExpression','nextDelay','2276617tngapP','logger','meshos','isValidCron','../../../modules/enums','356xvVOal','round','../../logger','toDate','454DZhcIm','Error\x20calculating\x20next\x20cron\x20job\x20execution\x20\x20delay:','4033464LRdlnN','CronHandler','3501AofVSO','__esModule','../../../modules/utils','13638NMnUeI','8xjUYtK','24670XBGjGb','hotmesh','getTime','69260GTJDpb','LoggerService','error','19883985GBxbyB','366463OHgxCj'];a=function(){return l;};return a();}function b(c,d){const e=a();return b=function(f,g){f=f-0x1cc;let h=e[f];return h;},b(c,d);}Object['defineProperty'](exports,j(0x1e8),{'value':!0x0}),exports[j(0x1e6)]=void 0x0;const cron_parser_1=require('cron-parser'),enums_1=require(j(0x1de)),utils_1=require(j(0x1e9)),logger_1=require(j(0x1e1));class CronHandler{[j(0x1d9)](c){const k=j;try{if(!(0x0,utils_1[k(0x1dd)])(c))return-0x1;const d=(0x0,cron_parser_1[k(0x1d8)])(c,{'utc':!0x0})[k(0x1d6)]()[k(0x1e2)](),f=new Date(),g=(d[k(0x1d0)]()-f[k(0x1d0)]())/0x3e8;if(g<=0x0)return-0x1;if(g<enums_1[k(0x1d7)])return enums_1[k(0x1d7)];return Math[k(0x1e0)](g);}catch(h){return CronHandler[k(0x1db)][k(0x1d3)](k(0x1e4),{'error':h}),-0x1;}}}exports['CronHandler']=CronHandler,CronHandler[j(0x1db)]=new logger_1[(j(0x1d2))](j(0x1cf),j(0x1dc));