Built motion from commit (unavailable).|2.4.3
[motion2.git] / server / api / mailQueue / mailQueue.rpc.js
index 83aed17..19a3074 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9379=['register','request','then','info','MailQueue,\x20%s,\x20%s','request\x20sent','debug','MailQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','GetMailQueue','findAll','options','raw','where','include','map','model','attributes','catch','ShowMailQueue','MailQueue','lodash','util','bluebird','randomstring','../../mysqldb','rpc','../../config/environment','jayson/promise','client','redis','defaults','socket.io-emitter','./mailQueue.socket'];(function(_0x4429e0,_0xee6f1f){var _0x51a5b3=function(_0x16eb11){while(--_0x16eb11){_0x4429e0['push'](_0x4429e0['shift']());}};_0x51a5b3(++_0xee6f1f);}(_0x9379,0x1e1));var _0x9937=function(_0x214339,_0x4f4db1){_0x214339=_0x214339-0x0;var _0x1d92d7=_0x9379[_0x214339];return _0x1d92d7;};'use strict';var _=require(_0x9937('0x0'));var util=require(_0x9937('0x1'));var moment=require('moment');var BPromise=require(_0x9937('0x2'));var rs=require(_0x9937('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x9937('0x4'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x9937('0x5'));var config=require(_0x9937('0x6'));var jayson=require(_0x9937('0x7'));var client=jayson[_0x9937('0x8')]['http']({'port':0x232a});config[_0x9937('0x9')]=_[_0x9937('0xa')](config[_0x9937('0x9')],{'host':'localhost','port':0x18eb});var socket=require(_0x9937('0xb'))(new Redis(config[_0x9937('0x9')]));require(_0x9937('0xc'))[_0x9937('0xd')](socket);function respondWithRpcPromise(_0x8ac2f3,_0xc82627,_0x179598){return new BPromise(function(_0x2f8a8f,_0x22fd79){return client[_0x9937('0xe')](_0x8ac2f3,_0x179598)[_0x9937('0xf')](function(_0x379f55){logger[_0x9937('0x10')](_0x9937('0x11'),_0xc82627,_0x9937('0x12'));logger[_0x9937('0x13')](_0x9937('0x14'),_0xc82627,_0x9937('0x12'),JSON[_0x9937('0x15')](_0x379f55));if(_0x379f55[_0x9937('0x16')]){if(_0x379f55[_0x9937('0x16')][_0x9937('0x17')]===0x1f4){logger[_0x9937('0x16')](_0x9937('0x11'),_0xc82627,_0x379f55[_0x9937('0x16')][_0x9937('0x18')]);return _0x22fd79(_0x379f55[_0x9937('0x16')]['message']);}logger[_0x9937('0x16')](_0x9937('0x11'),_0xc82627,_0x379f55[_0x9937('0x16')]['message']);return _0x2f8a8f(_0x379f55[_0x9937('0x16')][_0x9937('0x18')]);}else{logger[_0x9937('0x10')](_0x9937('0x11'),_0xc82627,_0x9937('0x12'));_0x2f8a8f(_0x379f55[_0x9937('0x19')][_0x9937('0x18')]);}})['catch'](function(_0x8fdb8e){logger[_0x9937('0x16')]('MailQueue,\x20%s,\x20%s',_0xc82627,_0x8fdb8e);_0x22fd79(_0x8fdb8e);});});}exports[_0x9937('0x1a')]=function(_0x21b47a){var _0x4a687d=this;return new Promise(function(_0x37b8a3,_0x10394e){return db['MailQueue'][_0x9937('0x1b')]({'raw':_0x21b47a[_0x9937('0x1c')]?_0x21b47a[_0x9937('0x1c')][_0x9937('0x1d')]===undefined?!![]:![]:!![],'where':_0x21b47a[_0x9937('0x1c')]?_0x21b47a[_0x9937('0x1c')][_0x9937('0x1e')]||null:null,'attributes':_0x21b47a['options']?_0x21b47a[_0x9937('0x1c')]['attributes']||null:null,'limit':_0x21b47a[_0x9937('0x1c')]?_0x21b47a['options']['limit']||null:null,'include':_0x21b47a[_0x9937('0x1c')]?_0x21b47a[_0x9937('0x1c')][_0x9937('0x1f')]?_[_0x9937('0x20')](_0x21b47a[_0x9937('0x1c')]['include'],function(_0x559ce4){return{'model':db[_0x559ce4[_0x9937('0x21')]],'as':_0x559ce4['as'],'attributes':_0x559ce4[_0x9937('0x22')],'include':_0x559ce4[_0x9937('0x1f')]?_[_0x9937('0x20')](_0x559ce4[_0x9937('0x1f')],function(_0x4c0e09){return{'model':db[_0x4c0e09[_0x9937('0x21')]],'as':_0x4c0e09['as'],'attributes':_0x4c0e09['attributes'],'include':_0x4c0e09['include']?_['map'](_0x4c0e09[_0x9937('0x1f')],function(_0x32acec){return{'model':db[_0x32acec[_0x9937('0x21')]],'as':_0x32acec['as'],'attributes':_0x32acec[_0x9937('0x22')]};}):[]};}):[]};}):[]:[]})[_0x9937('0xf')](function(_0x422721){logger[_0x9937('0x10')](_0x9937('0x1a'),_0x21b47a);logger[_0x9937('0x13')](_0x9937('0x1a'),_0x21b47a,JSON[_0x9937('0x15')](_0x422721));_0x37b8a3(_0x422721);})[_0x9937('0x23')](function(_0x4be760){logger[_0x9937('0x16')](_0x9937('0x1a'),_0x4be760[_0x9937('0x18')],_0x21b47a);_0x10394e(_0x4a687d['error'](0x1f4,_0x4be760[_0x9937('0x18')]));});});};exports[_0x9937('0x24')]=function(_0x229dc7){var _0x2ced63=this;return new Promise(function(_0x59e3ba,_0x38639b){return db[_0x9937('0x25')]['find']({'raw':_0x229dc7[_0x9937('0x1c')]?_0x229dc7[_0x9937('0x1c')][_0x9937('0x1d')]===undefined?!![]:![]:!![],'where':_0x229dc7['options']?_0x229dc7['options'][_0x9937('0x1e')]||null:null,'attributes':_0x229dc7[_0x9937('0x1c')]?_0x229dc7['options'][_0x9937('0x22')]||null:null,'include':_0x229dc7[_0x9937('0x1c')]?_0x229dc7[_0x9937('0x1c')][_0x9937('0x1f')]?_['map'](_0x229dc7[_0x9937('0x1c')][_0x9937('0x1f')],function(_0x385f18){return{'model':db[_0x385f18['model']],'as':_0x385f18['as'],'attributes':_0x385f18[_0x9937('0x22')],'include':_0x385f18['include']?_['map'](_0x385f18['include'],function(_0x1fd0a4){return{'model':db[_0x1fd0a4[_0x9937('0x21')]],'as':_0x1fd0a4['as'],'attributes':_0x1fd0a4['attributes'],'include':_0x1fd0a4[_0x9937('0x1f')]?_[_0x9937('0x20')](_0x1fd0a4[_0x9937('0x1f')],function(_0x50f7ba){return{'model':db[_0x50f7ba['model']],'as':_0x50f7ba['as'],'attributes':_0x50f7ba[_0x9937('0x22')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x1482b1){logger[_0x9937('0x10')](_0x9937('0x24'),_0x229dc7);logger['debug'](_0x9937('0x24'),_0x229dc7,JSON[_0x9937('0x15')](_0x1482b1));_0x59e3ba(_0x1482b1);})[_0x9937('0x23')](function(_0x3ba11a){logger['error'](_0x9937('0x24'),_0x3ba11a[_0x9937('0x18')],_0x229dc7);_0x38639b(_0x2ced63[_0x9937('0x16')](0x1f4,_0x3ba11a[_0x9937('0x18')]));});});};
\ No newline at end of file
+var _0xa7f7=['moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','socket.io-emitter','./mailQueue.socket','register','request','then','request\x20sent','stringify','error','code','MailQueue,\x20%s,\x20%s','message','info','result','catch','GetMailQueue','MailQueue','findAll','options','raw','attributes','limit','include','map','model','debug','ShowMailQueue','find','where','lodash'];(function(_0xc372fa,_0x5cc841){var _0x1366d6=function(_0x372145){while(--_0x372145){_0xc372fa['push'](_0xc372fa['shift']());}};_0x1366d6(++_0x5cc841);}(_0xa7f7,0x1cd));var _0x7a7f=function(_0x211fef,_0x4ab716){_0x211fef=_0x211fef-0x0;var _0x5447bf=_0xa7f7[_0x211fef];return _0x5447bf;};'use strict';var _=require(_0x7a7f('0x0'));var util=require('util');var moment=require(_0x7a7f('0x1'));var BPromise=require(_0x7a7f('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x7a7f('0x3'));var db=require(_0x7a7f('0x4'))['db'];var utils=require(_0x7a7f('0x5'));var logger=require(_0x7a7f('0x6'))(_0x7a7f('0x7'));var config=require(_0x7a7f('0x8'));var jayson=require(_0x7a7f('0x9'));var client=jayson[_0x7a7f('0xa')][_0x7a7f('0xb')]({'port':0x232a});config[_0x7a7f('0xc')]=_[_0x7a7f('0xd')](config[_0x7a7f('0xc')],{'host':'localhost','port':0x18eb});var socket=require(_0x7a7f('0xe'))(new Redis(config[_0x7a7f('0xc')]));require(_0x7a7f('0xf'))[_0x7a7f('0x10')](socket);function respondWithRpcPromise(_0x790b4d,_0x5419ac,_0x3c93f6){return new BPromise(function(_0x51ccd9,_0x207088){return client[_0x7a7f('0x11')](_0x790b4d,_0x3c93f6)[_0x7a7f('0x12')](function(_0x508b40){logger['info']('MailQueue,\x20%s,\x20%s',_0x5419ac,_0x7a7f('0x13'));logger['debug']('MailQueue,\x20%s,\x20%s,\x20%s',_0x5419ac,'request\x20sent',JSON[_0x7a7f('0x14')](_0x508b40));if(_0x508b40[_0x7a7f('0x15')]){if(_0x508b40[_0x7a7f('0x15')][_0x7a7f('0x16')]===0x1f4){logger[_0x7a7f('0x15')](_0x7a7f('0x17'),_0x5419ac,_0x508b40[_0x7a7f('0x15')][_0x7a7f('0x18')]);return _0x207088(_0x508b40[_0x7a7f('0x15')]['message']);}logger[_0x7a7f('0x15')](_0x7a7f('0x17'),_0x5419ac,_0x508b40[_0x7a7f('0x15')][_0x7a7f('0x18')]);return _0x51ccd9(_0x508b40[_0x7a7f('0x15')][_0x7a7f('0x18')]);}else{logger[_0x7a7f('0x19')](_0x7a7f('0x17'),_0x5419ac,_0x7a7f('0x13'));_0x51ccd9(_0x508b40[_0x7a7f('0x1a')][_0x7a7f('0x18')]);}})[_0x7a7f('0x1b')](function(_0x36c046){logger[_0x7a7f('0x15')](_0x7a7f('0x17'),_0x5419ac,_0x36c046);_0x207088(_0x36c046);});});}exports[_0x7a7f('0x1c')]=function(_0x1dcbb4){var _0xb04524=this;return new Promise(function(_0x261946,_0x4a02e8){return db[_0x7a7f('0x1d')][_0x7a7f('0x1e')]({'raw':_0x1dcbb4[_0x7a7f('0x1f')]?_0x1dcbb4[_0x7a7f('0x1f')][_0x7a7f('0x20')]===undefined?!![]:![]:!![],'where':_0x1dcbb4['options']?_0x1dcbb4['options']['where']||null:null,'attributes':_0x1dcbb4[_0x7a7f('0x1f')]?_0x1dcbb4[_0x7a7f('0x1f')][_0x7a7f('0x21')]||null:null,'limit':_0x1dcbb4[_0x7a7f('0x1f')]?_0x1dcbb4['options'][_0x7a7f('0x22')]||null:null,'include':_0x1dcbb4[_0x7a7f('0x1f')]?_0x1dcbb4[_0x7a7f('0x1f')][_0x7a7f('0x23')]?_[_0x7a7f('0x24')](_0x1dcbb4[_0x7a7f('0x1f')][_0x7a7f('0x23')],function(_0x129d58){return{'model':db[_0x129d58[_0x7a7f('0x25')]],'as':_0x129d58['as'],'attributes':_0x129d58[_0x7a7f('0x21')],'include':_0x129d58[_0x7a7f('0x23')]?_[_0x7a7f('0x24')](_0x129d58[_0x7a7f('0x23')],function(_0x75fd81){return{'model':db[_0x75fd81[_0x7a7f('0x25')]],'as':_0x75fd81['as'],'attributes':_0x75fd81['attributes'],'include':_0x75fd81['include']?_[_0x7a7f('0x24')](_0x75fd81['include'],function(_0x3394c1){return{'model':db[_0x3394c1[_0x7a7f('0x25')]],'as':_0x3394c1['as'],'attributes':_0x3394c1['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x7f7de){logger[_0x7a7f('0x19')](_0x7a7f('0x1c'),_0x1dcbb4);logger[_0x7a7f('0x26')](_0x7a7f('0x1c'),_0x1dcbb4,JSON['stringify'](_0x7f7de));_0x261946(_0x7f7de);})['catch'](function(_0x32c41b){logger[_0x7a7f('0x15')](_0x7a7f('0x1c'),_0x32c41b[_0x7a7f('0x18')],_0x1dcbb4);_0x4a02e8(_0xb04524[_0x7a7f('0x15')](0x1f4,_0x32c41b[_0x7a7f('0x18')]));});});};exports[_0x7a7f('0x27')]=function(_0x38ed64){var _0xdb0084=this;return new Promise(function(_0x40303f,_0x43a036){return db[_0x7a7f('0x1d')][_0x7a7f('0x28')]({'raw':_0x38ed64[_0x7a7f('0x1f')]?_0x38ed64[_0x7a7f('0x1f')][_0x7a7f('0x20')]===undefined?!![]:![]:!![],'where':_0x38ed64['options']?_0x38ed64[_0x7a7f('0x1f')][_0x7a7f('0x29')]||null:null,'attributes':_0x38ed64['options']?_0x38ed64[_0x7a7f('0x1f')][_0x7a7f('0x21')]||null:null,'include':_0x38ed64[_0x7a7f('0x1f')]?_0x38ed64['options'][_0x7a7f('0x23')]?_[_0x7a7f('0x24')](_0x38ed64[_0x7a7f('0x1f')][_0x7a7f('0x23')],function(_0x4650d9){return{'model':db[_0x4650d9[_0x7a7f('0x25')]],'as':_0x4650d9['as'],'attributes':_0x4650d9['attributes'],'include':_0x4650d9[_0x7a7f('0x23')]?_['map'](_0x4650d9[_0x7a7f('0x23')],function(_0x56aba9){return{'model':db[_0x56aba9[_0x7a7f('0x25')]],'as':_0x56aba9['as'],'attributes':_0x56aba9['attributes'],'include':_0x56aba9[_0x7a7f('0x23')]?_[_0x7a7f('0x24')](_0x56aba9[_0x7a7f('0x23')],function(_0x45aaf5){return{'model':db[_0x45aaf5[_0x7a7f('0x25')]],'as':_0x45aaf5['as'],'attributes':_0x45aaf5['attributes']};}):[]};}):[]};}):[]:[]})[_0x7a7f('0x12')](function(_0x29ec6d){logger[_0x7a7f('0x19')](_0x7a7f('0x27'),_0x38ed64);logger[_0x7a7f('0x26')](_0x7a7f('0x27'),_0x38ed64,JSON[_0x7a7f('0x14')](_0x29ec6d));_0x40303f(_0x29ec6d);})[_0x7a7f('0x1b')](function(_0x20c042){logger[_0x7a7f('0x15')]('ShowMailQueue',_0x20c042[_0x7a7f('0x18')],_0x38ed64);_0x43a036(_0xdb0084[_0x7a7f('0x15')](0x1f4,_0x20c042[_0x7a7f('0x18')]));});});};
\ No newline at end of file