Built motion from commit b0a9a629.|2.6.33
[motion2.git] / server / api / openchannelQueue / openchannelQueue.rpc.js
index 6b32026..3ff2609 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x178a=['options','attributes','limit','include','map','model','info','ShowOpenchannelQueue','OpenchannelQueue','raw','where','stringify','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','defaults','redis','socket.io-emitter','./openchannelQueue.socket','register','request','then','request\x20sent','debug','OpenchannelQueue,\x20%s,\x20%s,\x20%s','error','message','OpenchannelQueue,\x20%s,\x20%s','catch','GetOpenchannelQueue','findAll'];(function(_0x4bc100,_0x4b64c0){var _0x55d077=function(_0x52277f){while(--_0x52277f){_0x4bc100['push'](_0x4bc100['shift']());}};_0x55d077(++_0x4b64c0);}(_0x178a,0x162));var _0xa178=function(_0x3ca58f,_0x44e83e){_0x3ca58f=_0x3ca58f-0x0;var _0xceeb54=_0x178a[_0x3ca58f];return _0xceeb54;};'use strict';var _=require('lodash');var util=require(_0xa178('0x0'));var moment=require(_0xa178('0x1'));var BPromise=require('bluebird');var rs=require(_0xa178('0x2'));var fs=require('fs');var Redis=require(_0xa178('0x3'));var db=require(_0xa178('0x4'))['db'];var utils=require(_0xa178('0x5'));var logger=require(_0xa178('0x6'))(_0xa178('0x7'));var config=require(_0xa178('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xa178('0x9')]['http']({'port':0x232a});config['redis']=_[_0xa178('0xa')](config[_0xa178('0xb')],{'host':'localhost','port':0x18eb});var socket=require(_0xa178('0xc'))(new Redis(config['redis']));require(_0xa178('0xd'))[_0xa178('0xe')](socket);function respondWithRpcPromise(_0x5afd8c,_0x2c5909,_0x30ce71){return new BPromise(function(_0x20d76a,_0x3d8c96){return client[_0xa178('0xf')](_0x5afd8c,_0x30ce71)[_0xa178('0x10')](function(_0x12dd5c){logger['info']('OpenchannelQueue,\x20%s,\x20%s',_0x2c5909,_0xa178('0x11'));logger[_0xa178('0x12')](_0xa178('0x13'),_0x2c5909,_0xa178('0x11'),JSON['stringify'](_0x12dd5c));if(_0x12dd5c['error']){if(_0x12dd5c[_0xa178('0x14')]['code']===0x1f4){logger['error']('OpenchannelQueue,\x20%s,\x20%s',_0x2c5909,_0x12dd5c[_0xa178('0x14')][_0xa178('0x15')]);return _0x3d8c96(_0x12dd5c['error'][_0xa178('0x15')]);}logger['error'](_0xa178('0x16'),_0x2c5909,_0x12dd5c[_0xa178('0x14')][_0xa178('0x15')]);return _0x20d76a(_0x12dd5c[_0xa178('0x14')][_0xa178('0x15')]);}else{logger['info']('OpenchannelQueue,\x20%s,\x20%s',_0x2c5909,_0xa178('0x11'));_0x20d76a(_0x12dd5c['result'][_0xa178('0x15')]);}})[_0xa178('0x17')](function(_0x3b84c0){logger[_0xa178('0x14')](_0xa178('0x16'),_0x2c5909,_0x3b84c0);_0x3d8c96(_0x3b84c0);});});}exports[_0xa178('0x18')]=function(_0x5ecc86){var _0x3c44f4=this;return new Promise(function(_0x436fb6,_0x519839){return db['OpenchannelQueue'][_0xa178('0x19')]({'raw':_0x5ecc86['options']?_0x5ecc86['options']['raw']===undefined?!![]:![]:!![],'where':_0x5ecc86[_0xa178('0x1a')]?_0x5ecc86['options']['where']||null:null,'attributes':_0x5ecc86[_0xa178('0x1a')]?_0x5ecc86['options'][_0xa178('0x1b')]||null:null,'limit':_0x5ecc86[_0xa178('0x1a')]?_0x5ecc86['options'][_0xa178('0x1c')]||null:null,'include':_0x5ecc86[_0xa178('0x1a')]?_0x5ecc86[_0xa178('0x1a')][_0xa178('0x1d')]?_[_0xa178('0x1e')](_0x5ecc86[_0xa178('0x1a')][_0xa178('0x1d')],function(_0x1c0aa0){return{'model':db[_0x1c0aa0['model']],'as':_0x1c0aa0['as'],'attributes':_0x1c0aa0[_0xa178('0x1b')],'include':_0x1c0aa0[_0xa178('0x1d')]?_[_0xa178('0x1e')](_0x1c0aa0[_0xa178('0x1d')],function(_0x1758ad){return{'model':db[_0x1758ad[_0xa178('0x1f')]],'as':_0x1758ad['as'],'attributes':_0x1758ad[_0xa178('0x1b')],'include':_0x1758ad[_0xa178('0x1d')]?_[_0xa178('0x1e')](_0x1758ad[_0xa178('0x1d')],function(_0x3f5337){return{'model':db[_0x3f5337['model']],'as':_0x3f5337['as'],'attributes':_0x3f5337[_0xa178('0x1b')]};}):[]};}):[]};}):[]:[]})[_0xa178('0x10')](function(_0x4b4c2f){logger[_0xa178('0x20')](_0xa178('0x18'),_0x5ecc86);logger[_0xa178('0x12')]('GetOpenchannelQueue',_0x5ecc86,JSON['stringify'](_0x4b4c2f));_0x436fb6(_0x4b4c2f);})['catch'](function(_0x59de3d){logger[_0xa178('0x14')](_0xa178('0x18'),_0x59de3d[_0xa178('0x15')],_0x5ecc86);_0x519839(_0x3c44f4[_0xa178('0x14')](0x1f4,_0x59de3d['message']));});});};exports[_0xa178('0x21')]=function(_0xe18e75){var _0x331787=this;return new Promise(function(_0x305f7a,_0x3e7fc5){return db[_0xa178('0x22')]['find']({'raw':_0xe18e75['options']?_0xe18e75[_0xa178('0x1a')][_0xa178('0x23')]===undefined?!![]:![]:!![],'where':_0xe18e75[_0xa178('0x1a')]?_0xe18e75[_0xa178('0x1a')][_0xa178('0x24')]||null:null,'attributes':_0xe18e75[_0xa178('0x1a')]?_0xe18e75[_0xa178('0x1a')][_0xa178('0x1b')]||null:null,'include':_0xe18e75['options']?_0xe18e75['options'][_0xa178('0x1d')]?_[_0xa178('0x1e')](_0xe18e75[_0xa178('0x1a')][_0xa178('0x1d')],function(_0x4d0bbd){return{'model':db[_0x4d0bbd[_0xa178('0x1f')]],'as':_0x4d0bbd['as'],'attributes':_0x4d0bbd[_0xa178('0x1b')],'include':_0x4d0bbd[_0xa178('0x1d')]?_['map'](_0x4d0bbd[_0xa178('0x1d')],function(_0x25e9f3){return{'model':db[_0x25e9f3[_0xa178('0x1f')]],'as':_0x25e9f3['as'],'attributes':_0x25e9f3[_0xa178('0x1b')],'include':_0x25e9f3['include']?_[_0xa178('0x1e')](_0x25e9f3['include'],function(_0x48b112){return{'model':db[_0x48b112[_0xa178('0x1f')]],'as':_0x48b112['as'],'attributes':_0x48b112[_0xa178('0x1b')]};}):[]};}):[]};}):[]:[]})[_0xa178('0x10')](function(_0x266503){logger[_0xa178('0x20')](_0xa178('0x21'),_0xe18e75);logger[_0xa178('0x12')](_0xa178('0x21'),_0xe18e75,JSON[_0xa178('0x25')](_0x266503));_0x305f7a(_0x266503);})['catch'](function(_0x134253){logger[_0xa178('0x14')](_0xa178('0x21'),_0x134253[_0xa178('0x15')],_0xe18e75);_0x3e7fc5(_0x331787[_0xa178('0x14')](0x1f4,_0x134253['message']));});});};
\ No newline at end of file
+var _0xac5a=['find','raw','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','redis','./openchannelQueue.socket','register','request','then','info','OpenchannelQueue,\x20%s,\x20%s','request\x20sent','debug','OpenchannelQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','GetOpenchannelQueue','OpenchannelQueue','findAll','options','where','attributes','limit','include','map','model','ShowOpenchannelQueue'];(function(_0x2e0482,_0x1ffe16){var _0x3636e1=function(_0x14c95b){while(--_0x14c95b){_0x2e0482['push'](_0x2e0482['shift']());}};_0x3636e1(++_0x1ffe16);}(_0xac5a,0x192));var _0xaac5=function(_0x545bed,_0x221e96){_0x545bed=_0x545bed-0x0;var _0x16c79c=_0xac5a[_0x545bed];return _0x16c79c;};'use strict';var _=require('lodash');var util=require(_0xaac5('0x0'));var moment=require(_0xaac5('0x1'));var BPromise=require(_0xaac5('0x2'));var rs=require(_0xaac5('0x3'));var fs=require('fs');var Redis=require(_0xaac5('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xaac5('0x5'));var logger=require(_0xaac5('0x6'))(_0xaac5('0x7'));var config=require(_0xaac5('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xaac5('0x9')][_0xaac5('0xa')]({'port':0x232a});config[_0xaac5('0xb')]=_['defaults'](config[_0xaac5('0xb')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xaac5('0xb')]));require(_0xaac5('0xc'))[_0xaac5('0xd')](socket);function respondWithRpcPromise(_0x1fe214,_0x304196,_0xa74974){return new BPromise(function(_0x14d328,_0xe433ea){return client[_0xaac5('0xe')](_0x1fe214,_0xa74974)[_0xaac5('0xf')](function(_0x23393e){logger[_0xaac5('0x10')](_0xaac5('0x11'),_0x304196,_0xaac5('0x12'));logger[_0xaac5('0x13')](_0xaac5('0x14'),_0x304196,_0xaac5('0x12'),JSON[_0xaac5('0x15')](_0x23393e));if(_0x23393e[_0xaac5('0x16')]){if(_0x23393e[_0xaac5('0x16')][_0xaac5('0x17')]===0x1f4){logger['error'](_0xaac5('0x11'),_0x304196,_0x23393e[_0xaac5('0x16')][_0xaac5('0x18')]);return _0xe433ea(_0x23393e[_0xaac5('0x16')]['message']);}logger['error'](_0xaac5('0x11'),_0x304196,_0x23393e[_0xaac5('0x16')][_0xaac5('0x18')]);return _0x14d328(_0x23393e[_0xaac5('0x16')]['message']);}else{logger[_0xaac5('0x10')](_0xaac5('0x11'),_0x304196,_0xaac5('0x12'));_0x14d328(_0x23393e[_0xaac5('0x19')][_0xaac5('0x18')]);}})[_0xaac5('0x1a')](function(_0x411ec7){logger[_0xaac5('0x16')](_0xaac5('0x11'),_0x304196,_0x411ec7);_0xe433ea(_0x411ec7);});});}exports[_0xaac5('0x1b')]=function(_0x59ec83){var _0x401116=this;return new Promise(function(_0x5aa620,_0x2e4516){return db[_0xaac5('0x1c')][_0xaac5('0x1d')]({'raw':_0x59ec83[_0xaac5('0x1e')]?_0x59ec83[_0xaac5('0x1e')]['raw']===undefined?!![]:![]:!![],'where':_0x59ec83['options']?_0x59ec83[_0xaac5('0x1e')][_0xaac5('0x1f')]||null:null,'attributes':_0x59ec83[_0xaac5('0x1e')]?_0x59ec83[_0xaac5('0x1e')][_0xaac5('0x20')]||null:null,'limit':_0x59ec83[_0xaac5('0x1e')]?_0x59ec83[_0xaac5('0x1e')][_0xaac5('0x21')]||null:null,'include':_0x59ec83[_0xaac5('0x1e')]?_0x59ec83['options'][_0xaac5('0x22')]?_[_0xaac5('0x23')](_0x59ec83[_0xaac5('0x1e')][_0xaac5('0x22')],function(_0x3a4a2f){return{'model':db[_0x3a4a2f[_0xaac5('0x24')]],'as':_0x3a4a2f['as'],'attributes':_0x3a4a2f['attributes'],'include':_0x3a4a2f[_0xaac5('0x22')]?_[_0xaac5('0x23')](_0x3a4a2f['include'],function(_0x2a0e61){return{'model':db[_0x2a0e61[_0xaac5('0x24')]],'as':_0x2a0e61['as'],'attributes':_0x2a0e61[_0xaac5('0x20')],'include':_0x2a0e61[_0xaac5('0x22')]?_['map'](_0x2a0e61[_0xaac5('0x22')],function(_0x343034){return{'model':db[_0x343034[_0xaac5('0x24')]],'as':_0x343034['as'],'attributes':_0x343034[_0xaac5('0x20')]};}):[]};}):[]};}):[]:[]})[_0xaac5('0xf')](function(_0x35f9c0){logger[_0xaac5('0x10')](_0xaac5('0x1b'),_0x59ec83);logger[_0xaac5('0x13')](_0xaac5('0x1b'),_0x59ec83,JSON[_0xaac5('0x15')](_0x35f9c0));_0x5aa620(_0x35f9c0);})['catch'](function(_0x9ad569){logger[_0xaac5('0x16')](_0xaac5('0x1b'),_0x9ad569[_0xaac5('0x18')],_0x59ec83);_0x2e4516(_0x401116[_0xaac5('0x16')](0x1f4,_0x9ad569[_0xaac5('0x18')]));});});};exports[_0xaac5('0x25')]=function(_0x4003ce){var _0x4bd6ff=this;return new Promise(function(_0x2cc73d,_0x1a6445){return db[_0xaac5('0x1c')][_0xaac5('0x26')]({'raw':_0x4003ce[_0xaac5('0x1e')]?_0x4003ce['options'][_0xaac5('0x27')]===undefined?!![]:![]:!![],'where':_0x4003ce[_0xaac5('0x1e')]?_0x4003ce[_0xaac5('0x1e')][_0xaac5('0x1f')]||null:null,'attributes':_0x4003ce[_0xaac5('0x1e')]?_0x4003ce[_0xaac5('0x1e')][_0xaac5('0x20')]||null:null,'include':_0x4003ce[_0xaac5('0x1e')]?_0x4003ce[_0xaac5('0x1e')][_0xaac5('0x22')]?_[_0xaac5('0x23')](_0x4003ce[_0xaac5('0x1e')][_0xaac5('0x22')],function(_0x9cbd65){return{'model':db[_0x9cbd65[_0xaac5('0x24')]],'as':_0x9cbd65['as'],'attributes':_0x9cbd65['attributes'],'include':_0x9cbd65[_0xaac5('0x22')]?_[_0xaac5('0x23')](_0x9cbd65[_0xaac5('0x22')],function(_0x85115d){return{'model':db[_0x85115d[_0xaac5('0x24')]],'as':_0x85115d['as'],'attributes':_0x85115d['attributes'],'include':_0x85115d['include']?_[_0xaac5('0x23')](_0x85115d['include'],function(_0x124f8b){return{'model':db[_0x124f8b['model']],'as':_0x124f8b['as'],'attributes':_0x124f8b[_0xaac5('0x20')]};}):[]};}):[]};}):[]:[]})[_0xaac5('0xf')](function(_0x186cc0){logger[_0xaac5('0x10')](_0xaac5('0x25'),_0x4003ce);logger[_0xaac5('0x13')](_0xaac5('0x25'),_0x4003ce,JSON[_0xaac5('0x15')](_0x186cc0));_0x2cc73d(_0x186cc0);})[_0xaac5('0x1a')](function(_0x5abe7c){logger[_0xaac5('0x16')](_0xaac5('0x25'),_0x5abe7c[_0xaac5('0x18')],_0x4003ce);_0x1a6445(_0x4bd6ff[_0xaac5('0x16')](0x1f4,_0x5abe7c[_0xaac5('0x18')]));});});};
\ No newline at end of file