Built motion from commit 9e1399f3.|2.5.37
[motion2.git] / server / api / openchannelQueue / openchannelQueue.rpc.js
index ca6a8d3..e39c6f2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6e8c=['map','model','attributes','GetOpenchannelQueue','ShowOpenchannelQueue','find','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','redis','defaults','localhost','./openchannelQueue.socket','register','request','then','info','OpenchannelQueue,\x20%s,\x20%s','request\x20sent','debug','OpenchannelQueue,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','OpenchannelQueue','options','raw','where','include'];(function(_0x263bce,_0x65625c){var _0x1dc28c=function(_0x593081){while(--_0x593081){_0x263bce['push'](_0x263bce['shift']());}};_0x1dc28c(++_0x65625c);}(_0x6e8c,0x16e));var _0xc6e8=function(_0x533aff,_0x159df7){_0x533aff=_0x533aff-0x0;var _0x1dd270=_0x6e8c[_0x533aff];return _0x1dd270;};'use strict';var _=require(_0xc6e8('0x0'));var util=require(_0xc6e8('0x1'));var moment=require(_0xc6e8('0x2'));var BPromise=require(_0xc6e8('0x3'));var rs=require(_0xc6e8('0x4'));var fs=require('fs');var Redis=require(_0xc6e8('0x5'));var db=require(_0xc6e8('0x6'))['db'];var utils=require(_0xc6e8('0x7'));var logger=require(_0xc6e8('0x8'))('rpc');var config=require(_0xc6e8('0x9'));var jayson=require(_0xc6e8('0xa'));var client=jayson[_0xc6e8('0xb')]['http']({'port':0x232a});config[_0xc6e8('0xc')]=_[_0xc6e8('0xd')](config[_0xc6e8('0xc')],{'host':_0xc6e8('0xe'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xc6e8('0xc')]));require(_0xc6e8('0xf'))[_0xc6e8('0x10')](socket);function respondWithRpcPromise(_0x5cf134,_0x51f6e4,_0xb377f4){return new BPromise(function(_0x333b0d,_0x250e0e){return client[_0xc6e8('0x11')](_0x5cf134,_0xb377f4)[_0xc6e8('0x12')](function(_0xc6ae61){logger[_0xc6e8('0x13')](_0xc6e8('0x14'),_0x51f6e4,_0xc6e8('0x15'));logger[_0xc6e8('0x16')](_0xc6e8('0x17'),_0x51f6e4,_0xc6e8('0x15'),JSON[_0xc6e8('0x18')](_0xc6ae61));if(_0xc6ae61[_0xc6e8('0x19')]){if(_0xc6ae61[_0xc6e8('0x19')]['code']===0x1f4){logger[_0xc6e8('0x19')](_0xc6e8('0x14'),_0x51f6e4,_0xc6ae61[_0xc6e8('0x19')][_0xc6e8('0x1a')]);return _0x250e0e(_0xc6ae61['error'][_0xc6e8('0x1a')]);}logger['error'](_0xc6e8('0x14'),_0x51f6e4,_0xc6ae61['error']['message']);return _0x333b0d(_0xc6ae61[_0xc6e8('0x19')][_0xc6e8('0x1a')]);}else{logger[_0xc6e8('0x13')]('OpenchannelQueue,\x20%s,\x20%s',_0x51f6e4,_0xc6e8('0x15'));_0x333b0d(_0xc6ae61[_0xc6e8('0x1b')][_0xc6e8('0x1a')]);}})[_0xc6e8('0x1c')](function(_0x258859){logger[_0xc6e8('0x19')](_0xc6e8('0x14'),_0x51f6e4,_0x258859);_0x250e0e(_0x258859);});});}exports['GetOpenchannelQueue']=function(_0x2d7dec){var _0x2a538b=this;return new Promise(function(_0x3f07ae,_0x575116){return db[_0xc6e8('0x1d')]['findAll']({'raw':_0x2d7dec[_0xc6e8('0x1e')]?_0x2d7dec[_0xc6e8('0x1e')][_0xc6e8('0x1f')]===undefined?!![]:![]:!![],'where':_0x2d7dec['options']?_0x2d7dec[_0xc6e8('0x1e')][_0xc6e8('0x20')]||null:null,'attributes':_0x2d7dec[_0xc6e8('0x1e')]?_0x2d7dec[_0xc6e8('0x1e')]['attributes']||null:null,'limit':_0x2d7dec[_0xc6e8('0x1e')]?_0x2d7dec[_0xc6e8('0x1e')]['limit']||null:null,'include':_0x2d7dec[_0xc6e8('0x1e')]?_0x2d7dec[_0xc6e8('0x1e')][_0xc6e8('0x21')]?_[_0xc6e8('0x22')](_0x2d7dec[_0xc6e8('0x1e')][_0xc6e8('0x21')],function(_0x53d7a0){return{'model':db[_0x53d7a0[_0xc6e8('0x23')]],'as':_0x53d7a0['as'],'attributes':_0x53d7a0[_0xc6e8('0x24')],'include':_0x53d7a0[_0xc6e8('0x21')]?_[_0xc6e8('0x22')](_0x53d7a0[_0xc6e8('0x21')],function(_0xd7ce9f){return{'model':db[_0xd7ce9f['model']],'as':_0xd7ce9f['as'],'attributes':_0xd7ce9f[_0xc6e8('0x24')],'include':_0xd7ce9f[_0xc6e8('0x21')]?_['map'](_0xd7ce9f[_0xc6e8('0x21')],function(_0x5cb53e){return{'model':db[_0x5cb53e[_0xc6e8('0x23')]],'as':_0x5cb53e['as'],'attributes':_0x5cb53e[_0xc6e8('0x24')]};}):[]};}):[]};}):[]:[]})[_0xc6e8('0x12')](function(_0x83dd85){logger['info']('GetOpenchannelQueue',_0x2d7dec);logger['debug'](_0xc6e8('0x25'),_0x2d7dec,JSON['stringify'](_0x83dd85));_0x3f07ae(_0x83dd85);})[_0xc6e8('0x1c')](function(_0x25ac70){logger['error'](_0xc6e8('0x25'),_0x25ac70[_0xc6e8('0x1a')],_0x2d7dec);_0x575116(_0x2a538b[_0xc6e8('0x19')](0x1f4,_0x25ac70[_0xc6e8('0x1a')]));});});};exports[_0xc6e8('0x26')]=function(_0xa09ee){var _0x51a6a0=this;return new Promise(function(_0x386827,_0x14178c){return db[_0xc6e8('0x1d')][_0xc6e8('0x27')]({'raw':_0xa09ee[_0xc6e8('0x1e')]?_0xa09ee[_0xc6e8('0x1e')][_0xc6e8('0x1f')]===undefined?!![]:![]:!![],'where':_0xa09ee['options']?_0xa09ee[_0xc6e8('0x1e')]['where']||null:null,'attributes':_0xa09ee[_0xc6e8('0x1e')]?_0xa09ee['options'][_0xc6e8('0x24')]||null:null,'include':_0xa09ee['options']?_0xa09ee[_0xc6e8('0x1e')][_0xc6e8('0x21')]?_['map'](_0xa09ee[_0xc6e8('0x1e')][_0xc6e8('0x21')],function(_0x1cd601){return{'model':db[_0x1cd601[_0xc6e8('0x23')]],'as':_0x1cd601['as'],'attributes':_0x1cd601[_0xc6e8('0x24')],'include':_0x1cd601[_0xc6e8('0x21')]?_['map'](_0x1cd601[_0xc6e8('0x21')],function(_0x1b0b98){return{'model':db[_0x1b0b98['model']],'as':_0x1b0b98['as'],'attributes':_0x1b0b98[_0xc6e8('0x24')],'include':_0x1b0b98[_0xc6e8('0x21')]?_[_0xc6e8('0x22')](_0x1b0b98[_0xc6e8('0x21')],function(_0x32c3ff){return{'model':db[_0x32c3ff[_0xc6e8('0x23')]],'as':_0x32c3ff['as'],'attributes':_0x32c3ff[_0xc6e8('0x24')]};}):[]};}):[]};}):[]:[]})[_0xc6e8('0x12')](function(_0x13c3f9){logger[_0xc6e8('0x13')]('ShowOpenchannelQueue',_0xa09ee);logger[_0xc6e8('0x16')](_0xc6e8('0x26'),_0xa09ee,JSON['stringify'](_0x13c3f9));_0x386827(_0x13c3f9);})[_0xc6e8('0x1c')](function(_0x18e156){logger[_0xc6e8('0x19')](_0xc6e8('0x26'),_0x18e156[_0xc6e8('0x1a')],_0xa09ee);_0x14178c(_0x51a6a0[_0xc6e8('0x19')](0x1f4,_0x18e156[_0xc6e8('0x1a')]));});});};
\ No newline at end of file
+var _0xa309=['OpenchannelQueue,\x20%s,\x20%s,\x20%s','error','code','message','OpenchannelQueue,\x20%s,\x20%s','info','result','catch','GetOpenchannelQueue','OpenchannelQueue','findAll','options','limit','include','map','attributes','model','then','stringify','ShowOpenchannelQueue','raw','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./openchannelQueue.socket','register','request','request\x20sent','debug'];(function(_0x34c0f1,_0x52ee0c){var _0xabef14=function(_0x27f20a){while(--_0x27f20a){_0x34c0f1['push'](_0x34c0f1['shift']());}};_0xabef14(++_0x52ee0c);}(_0xa309,0x1cd));var _0x9a30=function(_0x1a4e5a,_0x4cd134){_0x1a4e5a=_0x1a4e5a-0x0;var _0x28e285=_0xa309[_0x1a4e5a];return _0x28e285;};'use strict';var _=require('lodash');var util=require(_0x9a30('0x0'));var moment=require('moment');var BPromise=require(_0x9a30('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x9a30('0x2'));var db=require(_0x9a30('0x3'))['db'];var utils=require(_0x9a30('0x4'));var logger=require(_0x9a30('0x5'))('rpc');var config=require(_0x9a30('0x6'));var jayson=require(_0x9a30('0x7'));var client=jayson[_0x9a30('0x8')][_0x9a30('0x9')]({'port':0x232a});config[_0x9a30('0xa')]=_[_0x9a30('0xb')](config[_0x9a30('0xa')],{'host':_0x9a30('0xc'),'port':0x18eb});var socket=require(_0x9a30('0xd'))(new Redis(config['redis']));require(_0x9a30('0xe'))[_0x9a30('0xf')](socket);function respondWithRpcPromise(_0x180e9c,_0x22558b,_0x197071){return new BPromise(function(_0x4d405d,_0x55a70a){return client[_0x9a30('0x10')](_0x180e9c,_0x197071)['then'](function(_0x2fc78d){logger['info']('OpenchannelQueue,\x20%s,\x20%s',_0x22558b,_0x9a30('0x11'));logger[_0x9a30('0x12')](_0x9a30('0x13'),_0x22558b,_0x9a30('0x11'),JSON['stringify'](_0x2fc78d));if(_0x2fc78d[_0x9a30('0x14')]){if(_0x2fc78d[_0x9a30('0x14')][_0x9a30('0x15')]===0x1f4){logger[_0x9a30('0x14')]('OpenchannelQueue,\x20%s,\x20%s',_0x22558b,_0x2fc78d[_0x9a30('0x14')][_0x9a30('0x16')]);return _0x55a70a(_0x2fc78d[_0x9a30('0x14')][_0x9a30('0x16')]);}logger['error'](_0x9a30('0x17'),_0x22558b,_0x2fc78d[_0x9a30('0x14')][_0x9a30('0x16')]);return _0x4d405d(_0x2fc78d[_0x9a30('0x14')][_0x9a30('0x16')]);}else{logger[_0x9a30('0x18')]('OpenchannelQueue,\x20%s,\x20%s',_0x22558b,_0x9a30('0x11'));_0x4d405d(_0x2fc78d[_0x9a30('0x19')]['message']);}})[_0x9a30('0x1a')](function(_0x1d4c39){logger[_0x9a30('0x14')](_0x9a30('0x17'),_0x22558b,_0x1d4c39);_0x55a70a(_0x1d4c39);});});}exports[_0x9a30('0x1b')]=function(_0x4a5d0e){var _0x12f126=this;return new Promise(function(_0x5b620d,_0x1b1a9c){return db[_0x9a30('0x1c')][_0x9a30('0x1d')]({'raw':_0x4a5d0e[_0x9a30('0x1e')]?_0x4a5d0e[_0x9a30('0x1e')]['raw']===undefined?!![]:![]:!![],'where':_0x4a5d0e[_0x9a30('0x1e')]?_0x4a5d0e[_0x9a30('0x1e')]['where']||null:null,'attributes':_0x4a5d0e[_0x9a30('0x1e')]?_0x4a5d0e[_0x9a30('0x1e')]['attributes']||null:null,'limit':_0x4a5d0e[_0x9a30('0x1e')]?_0x4a5d0e[_0x9a30('0x1e')][_0x9a30('0x1f')]||null:null,'include':_0x4a5d0e[_0x9a30('0x1e')]?_0x4a5d0e[_0x9a30('0x1e')][_0x9a30('0x20')]?_[_0x9a30('0x21')](_0x4a5d0e[_0x9a30('0x1e')][_0x9a30('0x20')],function(_0x293f2a){return{'model':db[_0x293f2a['model']],'as':_0x293f2a['as'],'attributes':_0x293f2a[_0x9a30('0x22')],'include':_0x293f2a[_0x9a30('0x20')]?_['map'](_0x293f2a['include'],function(_0x3a398a){return{'model':db[_0x3a398a[_0x9a30('0x23')]],'as':_0x3a398a['as'],'attributes':_0x3a398a[_0x9a30('0x22')],'include':_0x3a398a[_0x9a30('0x20')]?_[_0x9a30('0x21')](_0x3a398a[_0x9a30('0x20')],function(_0xa1cd97){return{'model':db[_0xa1cd97[_0x9a30('0x23')]],'as':_0xa1cd97['as'],'attributes':_0xa1cd97[_0x9a30('0x22')]};}):[]};}):[]};}):[]:[]})[_0x9a30('0x24')](function(_0x379b78){logger[_0x9a30('0x18')](_0x9a30('0x1b'),_0x4a5d0e);logger[_0x9a30('0x12')]('GetOpenchannelQueue',_0x4a5d0e,JSON[_0x9a30('0x25')](_0x379b78));_0x5b620d(_0x379b78);})['catch'](function(_0x48b5b0){logger[_0x9a30('0x14')](_0x9a30('0x1b'),_0x48b5b0[_0x9a30('0x16')],_0x4a5d0e);_0x1b1a9c(_0x12f126['error'](0x1f4,_0x48b5b0[_0x9a30('0x16')]));});});};exports[_0x9a30('0x26')]=function(_0x523f97){var _0x13e2a0=this;return new Promise(function(_0x4f6d8b,_0x24592f){return db[_0x9a30('0x1c')]['find']({'raw':_0x523f97[_0x9a30('0x1e')]?_0x523f97[_0x9a30('0x1e')][_0x9a30('0x27')]===undefined?!![]:![]:!![],'where':_0x523f97['options']?_0x523f97[_0x9a30('0x1e')]['where']||null:null,'attributes':_0x523f97[_0x9a30('0x1e')]?_0x523f97[_0x9a30('0x1e')][_0x9a30('0x22')]||null:null,'include':_0x523f97[_0x9a30('0x1e')]?_0x523f97[_0x9a30('0x1e')]['include']?_[_0x9a30('0x21')](_0x523f97[_0x9a30('0x1e')][_0x9a30('0x20')],function(_0x1cc58b){return{'model':db[_0x1cc58b[_0x9a30('0x23')]],'as':_0x1cc58b['as'],'attributes':_0x1cc58b['attributes'],'include':_0x1cc58b[_0x9a30('0x20')]?_[_0x9a30('0x21')](_0x1cc58b[_0x9a30('0x20')],function(_0x2672c2){return{'model':db[_0x2672c2[_0x9a30('0x23')]],'as':_0x2672c2['as'],'attributes':_0x2672c2[_0x9a30('0x22')],'include':_0x2672c2[_0x9a30('0x20')]?_[_0x9a30('0x21')](_0x2672c2[_0x9a30('0x20')],function(_0x3325cd){return{'model':db[_0x3325cd[_0x9a30('0x23')]],'as':_0x3325cd['as'],'attributes':_0x3325cd['attributes']};}):[]};}):[]};}):[]:[]})[_0x9a30('0x24')](function(_0x26d4a2){logger[_0x9a30('0x18')]('ShowOpenchannelQueue',_0x523f97);logger[_0x9a30('0x12')](_0x9a30('0x26'),_0x523f97,JSON[_0x9a30('0x25')](_0x26d4a2));_0x4f6d8b(_0x26d4a2);})[_0x9a30('0x1a')](function(_0x1be9fb){logger['error'](_0x9a30('0x26'),_0x1be9fb['message'],_0x523f97);_0x24592f(_0x13e2a0['error'](0x1f4,_0x1be9fb[_0x9a30('0x16')]));});});};
\ No newline at end of file