Built motion from commit e493b9a4954b50a8ee6d0034ba3601cd210d989d. Version 3.0.0...
[motion-next.git] / server / api / mailQueue / mailQueue.rpc.js
1 'use strict';const a509_0xe292=['rpc','findOne','1262sKqDcs','then','1327JoCAWR','where','debug','1291fnSXmN','map','@rediscache','message','@mysqldb','322081cgPCrx','include','618032mTYInL','attributes','ShowMailQueue','GetMailQueue','179zkwVaX','catch','MailQueue','lodash','21TPZIzL','error','raw','@config/logger','28439rxumvp','options','822kQfmNc','register','521sLydqc','./mailQueue.socket','1045307JHyZkp','stringify','limit','model'];const a509_0x30d9=function(_0x369632,_0xb4d0f){_0x369632=_0x369632-0xb3;let _0xe29287=a509_0xe292[_0x369632];return _0xe29287;};const a509_0x5192f0=a509_0x30d9;(function(_0x516a9d,_0x4fa536){const _0x1b168a=a509_0x30d9;while(!![]){try{const _0x4d3856=-parseInt(_0x1b168a(0xcf))*-parseInt(_0x1b168a(0xc5))+-parseInt(_0x1b168a(0xb5))+-parseInt(_0x1b168a(0xb7))+-parseInt(_0x1b168a(0xbb))*-parseInt(_0x1b168a(0xd1))+-parseInt(_0x1b168a(0xc9))+-parseInt(_0x1b168a(0xd4))*-parseInt(_0x1b168a(0xc7))+parseInt(_0x1b168a(0xc3))*parseInt(_0x1b168a(0xbf));if(_0x4d3856===_0x4fa536)break;else _0x516a9d['push'](_0x516a9d['shift']());}catch(_0x4d3480){_0x516a9d['push'](_0x516a9d['shift']());}}}(a509_0xe292,0x888cb));const _=require(a509_0x5192f0(0xbe)),db=require(a509_0x5192f0(0xb4))['db'],logger=require(a509_0x5192f0(0xc2))(a509_0x5192f0(0xcd)),{getSocket}=require(a509_0x5192f0(0xd6)),socket=getSocket();require(a509_0x5192f0(0xc8))[a509_0x5192f0(0xc6)](socket),exports[a509_0x5192f0(0xba)]=function(_0x1f7445){const _0x346bca=this;return new Promise(function(_0x1a82bf,_0x4c3417){const _0x244765=a509_0x30d9;return db[_0x244765(0xbd)]['findAll']({'raw':_0x1f7445[_0x244765(0xc4)]?_0x1f7445[_0x244765(0xc4)][_0x244765(0xc1)]===undefined?!![]:![]:!![],'where':_0x1f7445[_0x244765(0xc4)]?_0x1f7445[_0x244765(0xc4)][_0x244765(0xd2)]||null:null,'attributes':_0x1f7445[_0x244765(0xc4)]?_0x1f7445[_0x244765(0xc4)][_0x244765(0xb8)]||null:null,'limit':_0x1f7445[_0x244765(0xc4)]?_0x1f7445[_0x244765(0xc4)][_0x244765(0xcb)]||null:null,'include':_0x1f7445[_0x244765(0xc4)]?_0x1f7445[_0x244765(0xc4)][_0x244765(0xb6)]?_['map'](_0x1f7445[_0x244765(0xc4)][_0x244765(0xb6)],function(_0x2316c0){const _0x1ca82a=_0x244765;return{'model':db[_0x2316c0[_0x1ca82a(0xcc)]],'as':_0x2316c0['as'],'attributes':_0x2316c0[_0x1ca82a(0xb8)],'include':_0x2316c0['include']?_[_0x1ca82a(0xd5)](_0x2316c0[_0x1ca82a(0xb6)],function(_0x17738c){const _0x4f89b1=_0x1ca82a;return{'model':db[_0x17738c['model']],'as':_0x17738c['as'],'attributes':_0x17738c[_0x4f89b1(0xb8)],'include':_0x17738c[_0x4f89b1(0xb6)]?_['map'](_0x17738c[_0x4f89b1(0xb6)],function(_0x475adb){const _0x3401b3=_0x4f89b1;return{'model':db[_0x475adb['model']],'as':_0x475adb['as'],'attributes':_0x475adb[_0x3401b3(0xb8)]};}):[]};}):[]};}):[]:[]})[_0x244765(0xd0)](function(_0x3c295f){const _0x3cb51f=_0x244765;logger['info'](_0x3cb51f(0xba),_0x1f7445),logger[_0x3cb51f(0xd3)]('GetMailQueue',_0x1f7445,JSON['stringify'](_0x3c295f)),_0x1a82bf(_0x3c295f);})[_0x244765(0xbc)](function(_0x3cf04d){const _0x2a0477=_0x244765;logger['error'](_0x2a0477(0xba),_0x3cf04d[_0x2a0477(0xb3)],_0x1f7445),_0x4c3417(_0x346bca[_0x2a0477(0xc0)](0x1f4,_0x3cf04d[_0x2a0477(0xb3)]));});});},exports[a509_0x5192f0(0xb9)]=function(_0x494499){const _0x4138b8=this;return new Promise(function(_0x24743b,_0x424bee){const _0x1473f7=a509_0x30d9;return db[_0x1473f7(0xbd)][_0x1473f7(0xce)]({'raw':_0x494499[_0x1473f7(0xc4)]?_0x494499[_0x1473f7(0xc4)][_0x1473f7(0xc1)]===undefined?!![]:![]:!![],'where':_0x494499[_0x1473f7(0xc4)]?_0x494499[_0x1473f7(0xc4)][_0x1473f7(0xd2)]||null:null,'attributes':_0x494499[_0x1473f7(0xc4)]?_0x494499[_0x1473f7(0xc4)][_0x1473f7(0xb8)]||null:null,'include':_0x494499[_0x1473f7(0xc4)]?_0x494499[_0x1473f7(0xc4)][_0x1473f7(0xb6)]?_['map'](_0x494499[_0x1473f7(0xc4)][_0x1473f7(0xb6)],function(_0x61ae22){const _0x54b09e=_0x1473f7;return{'model':db[_0x61ae22[_0x54b09e(0xcc)]],'as':_0x61ae22['as'],'attributes':_0x61ae22[_0x54b09e(0xb8)],'include':_0x61ae22[_0x54b09e(0xb6)]?_[_0x54b09e(0xd5)](_0x61ae22[_0x54b09e(0xb6)],function(_0x17627f){const _0x5b6397=_0x54b09e;return{'model':db[_0x17627f[_0x5b6397(0xcc)]],'as':_0x17627f['as'],'attributes':_0x17627f[_0x5b6397(0xb8)],'include':_0x17627f['include']?_[_0x5b6397(0xd5)](_0x17627f[_0x5b6397(0xb6)],function(_0x2275f2){const _0x39f213=_0x5b6397;return{'model':db[_0x2275f2[_0x39f213(0xcc)]],'as':_0x2275f2['as'],'attributes':_0x2275f2[_0x39f213(0xb8)]};}):[]};}):[]};}):[]:[]})[_0x1473f7(0xd0)](function(_0x56db9b){const _0x1b5d2c=_0x1473f7;logger['info'](_0x1b5d2c(0xb9),_0x494499),logger['debug'](_0x1b5d2c(0xb9),_0x494499,JSON[_0x1b5d2c(0xca)](_0x56db9b)),_0x24743b(_0x56db9b);})['catch'](function(_0x14d3a5){const _0x1bfd84=_0x1473f7;logger['error'](_0x1bfd84(0xb9),_0x14d3a5[_0x1bfd84(0xb3)],_0x494499),_0x424bee(_0x4138b8[_0x1bfd84(0xc0)](0x1f4,_0x14d3a5[_0x1bfd84(0xb3)]));});});};