@hotmeshio/hotmesh
Version:
Serverless Workflow
1 lines • 5.71 kB
JavaScript
'use strict';const m=b;(function(c,d){const l=b,e=c();while(!![]){try{const f=-parseInt(l(0x193))/0x1+parseInt(l(0x1e1))/0x2+-parseInt(l(0x1d8))/0x3*(parseInt(l(0x1ab))/0x4)+parseInt(l(0x19a))/0x5*(-parseInt(l(0x1a9))/0x6)+-parseInt(l(0x1e4))/0x7+parseInt(l(0x1a2))/0x8+-parseInt(l(0x1ce))/0x9*(-parseInt(l(0x1b7))/0xa);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x5b3c5));Object[m(0x1dd)](exports,m(0x1a3),{'value':!0x0}),exports['Interrupt']=void 0x0;function b(c,d){const e=a();return b=function(f,g){f=f-0x193;let h=e[f];return h;},b(c,d);}function a(){const t=['adjacencyList','transition','notarizeEarlyCompletion','exec','topic','Pipe','duplicate','159130Pfhqre','setActivityError','throw','startActivitySpan','resolveStatus','endActivitySpan','info','engine','interrupt','context','../../modules/errors','transact','guid','../telemetry','expire','error','mapActivityAttributes','interrupt-inactive-job-error','interrupt-collation-error','gid','code','output','setStatus','567jltUyk','stack','store','logger','jid','reason','appId','isInterruptingSelf','job','target','6uEiNIV','length','Activity','descend','interrupt-process-end','defineProperty','config','interruptAnother','setState','662036aYlMEm','CollationError','../pipe','2739611QVCqjY','722576PzRvbC','TelemetryService','interruptSelf','interrupt-collation-overage','../collator','process','mapOutputData','5VQXccN','setActivityAttributes','aid','resolve','mapJobData','debug','interrupt-process-error','fault','2976608pzliay','__esModule','join','Interrupt','metadata','InactiveJobError','maps','519462JCihfX','./activity','262772TUrwKN','filterAdjacent','interrupt-get-state-error','GetStateError','GenerationalError'];a=function(){return t;};return a();}const errors_1=require(m(0x1c1)),collator_1=require(m(0x197)),pipe_1=require(m(0x1e3)),telemetry_1=require(m(0x1c4)),activity_1=require(m(0x1aa));class Interrupt extends activity_1[m(0x1da)]{constructor(c,d,f,g,h,j){super(c,d,f,g,h,j);}async[m(0x198)](){const n=m;let c;this[n(0x1d1)][n(0x19f)]('interrupt-process',{'jid':this['context'][n(0x1a6)][n(0x1d2)],'gid':this[n(0x1c0)][n(0x1a6)][n(0x1ca)],'aid':this[n(0x1a6)][n(0x19c)]});try{await this['verifyEntry'](),c=new telemetry_1[(n(0x194))](this[n(0x1be)][n(0x1d4)],this[n(0x1de)],this[n(0x1a6)],this[n(0x1c0)]),c[n(0x1ba)](this['leg']),this[n(0x1d5)]()?await this[n(0x195)](c):await this[n(0x1df)](c);}catch(d){if(d instanceof errors_1[n(0x1a7)])return void this[n(0x1d1)]['error'](n(0x1c8),{'error':d});if(d instanceof errors_1[n(0x1af)])return void this['logger'][n(0x1bd)]('process-event-generational-job-error',{'error':d});if(d instanceof errors_1[n(0x1ae)])return void this[n(0x1d1)]['error'](n(0x1ad),{'error':d});if(d instanceof errors_1[n(0x1e2)]){if(n(0x1b6)===d[n(0x1a1)])return void this['logger']['info'](n(0x196),{'job_id':this[n(0x1c0)][n(0x1a6)][n(0x1d2)],'guid':this[n(0x1c0)]['metadata'][n(0x1c3)]});this[n(0x1d1)][n(0x1c6)](n(0x1c9),{'error':d});}else this[n(0x1d1)][n(0x1c6)](n(0x1a0),{'error':d});throw c?.[n(0x1b8)](d['message']),d;}finally{c?.[n(0x1bc)](),this['logger']['debug'](n(0x1dc),{'jid':this[n(0x1c0)][n(0x1a6)]['jid'],'gid':this[n(0x1c0)][n(0x1a6)][n(0x1ca)],'aid':this[n(0x1a6)][n(0x19c)]});}}async[m(0x195)](c){const o=m;this[o(0x1de)][o(0x1d6)]?.[o(0x1a8)]&&(this[o(0x19e)](),await this[o(0x1e0)]());const d=await this[o(0x1bf)]();c[o(0x1c7)]();const f=this['store'][o(0x1c2)]();await collator_1['CollatorService'][o(0x1b2)](this,f),await this[o(0x1cd)](-0x1,f);const g=await f[o(0x1b3)](),h=this[o(0x1bb)](g);return c['setActivityAttributes']({'app.activity.mid':d,'app.job.jss':h}),this['context'][o(0x1a6)]['aid'];}async[m(0x1df)](c){const p=m,d={'app.activity.mid':await this['interrupt']()};if(c[p(0x1c7)](),this[p(0x1b0)]=await this[p(0x1ac)](),this[p(0x1de)]['job']?.['maps']||this['config'][p(0x1cc)]?.[p(0x1a8)]){this[p(0x199)](),this['mapJobData']();const k=this[p(0x1d0)]['transact']();await this['setState'](k);}const f=this['store'][p(0x1c2)]();await collator_1['CollatorService'][p(0x1b2)](this,f),await this[p(0x1cd)](this[p(0x1b0)][p(0x1d9)]-0x1,f);const g=await f['exec'](),h=this[p(0x1bb)](g);d['app.job.jss']=h;const j=await this[p(0x1b1)](this[p(0x1b0)],h);return j[p(0x1d9)]&&(d['app.activity.mids']=j[p(0x1a4)](',')),c[p(0x19b)](d),this[p(0x1c0)][p(0x1a6)]['aid'];}['isInterruptingSelf'](){const q=m;if(!this['config']['target'])return!0x0;return pipe_1[q(0x1b5)][q(0x19d)](this[q(0x1de)][q(0x1d7)],this[q(0x1c0)])==this[q(0x1c0)][q(0x1a6)][q(0x1d2)];}['resolveInterruptOptions'](){const r=m;return{'reason':void 0x0!==this[r(0x1de)][r(0x1d3)]?pipe_1['Pipe'][r(0x19d)](this[r(0x1de)][r(0x1d3)],this[r(0x1c0)]):void 0x0,'throw':void 0x0!==this[r(0x1de)]['throw']?pipe_1[r(0x1b5)][r(0x19d)](this[r(0x1de)][r(0x1b9)],this['context']):void 0x0,'descend':void 0x0!==this[r(0x1de)][r(0x1db)]?pipe_1[r(0x1b5)][r(0x19d)](this[r(0x1de)]['descend'],this[r(0x1c0)]):void 0x0,'code':void 0x0!==this[r(0x1de)][r(0x1cb)]?pipe_1[r(0x1b5)][r(0x19d)](this[r(0x1de)]['code'],this[r(0x1c0)]):void 0x0,'expire':void 0x0!==this[r(0x1de)][r(0x1c5)]?pipe_1[r(0x1b5)][r(0x19d)](this[r(0x1de)]['expire'],this[r(0x1c0)]):void 0x0,'stack':void 0x0!==this[r(0x1de)][r(0x1cf)]?pipe_1['Pipe'][r(0x19d)](this['config'][r(0x1cf)],this[r(0x1c0)]):void 0x0};}async[m(0x1bf)](){const s=m,c=this['resolveInterruptOptions']();return await this[s(0x1be)][s(0x1bf)](void 0x0!==this[s(0x1de)][s(0x1b4)]?pipe_1['Pipe'][s(0x19d)](this[s(0x1de)][s(0x1b4)],this[s(0x1c0)]):this['context'][s(0x1a6)]['tpc'],void 0x0!==this[s(0x1de)][s(0x1d7)]?pipe_1[s(0x1b5)][s(0x19d)](this[s(0x1de)][s(0x1d7)],this['context']):this[s(0x1c0)][s(0x1a6)][s(0x1d2)],c);}}exports[m(0x1a5)]=Interrupt;