Built motion from commit (unavailable).|2.5.22
[motion2.git] / server / api / network / network.rpc.js
index e5bdeb5..8016b3d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa74f=['Network,\x20%s,\x20%s,\x20%s','stringify','error','message','Network,\x20%s,\x20%s','result','catch','lodash','util','moment','bluebird','ioredis','../../config/utils','rpc','jayson/promise','http','request','then','info','request\x20sent','debug'];(function(_0x57966a,_0x477964){var _0x191765=function(_0x106a01){while(--_0x106a01){_0x57966a['push'](_0x57966a['shift']());}};_0x191765(++_0x477964);}(_0xa74f,0x142));var _0xfa74=function(_0x4c4042,_0x1ea485){_0x4c4042=_0x4c4042-0x0;var _0xbd10dc=_0xa74f[_0x4c4042];return _0xbd10dc;};'use strict';var _=require(_0xfa74('0x0'));var util=require(_0xfa74('0x1'));var moment=require(_0xfa74('0x2'));var BPromise=require(_0xfa74('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xfa74('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xfa74('0x5'));var logger=require('../../config/logger')(_0xfa74('0x6'));var config=require('../../config/environment');var jayson=require(_0xfa74('0x7'));var client=jayson['client'][_0xfa74('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x89eeac,_0x48ffb4,_0x3972e3){return new BPromise(function(_0xd66310,_0x49668b){return client[_0xfa74('0x9')](_0x89eeac,_0x3972e3)[_0xfa74('0xa')](function(_0x28b21d){logger[_0xfa74('0xb')]('Network,\x20%s,\x20%s',_0x48ffb4,_0xfa74('0xc'));logger[_0xfa74('0xd')](_0xfa74('0xe'),_0x48ffb4,_0xfa74('0xc'),JSON[_0xfa74('0xf')](_0x28b21d));if(_0x28b21d[_0xfa74('0x10')]){if(_0x28b21d[_0xfa74('0x10')]['code']===0x1f4){logger['error']('Network,\x20%s,\x20%s',_0x48ffb4,_0x28b21d['error'][_0xfa74('0x11')]);return _0x49668b(_0x28b21d[_0xfa74('0x10')][_0xfa74('0x11')]);}logger[_0xfa74('0x10')](_0xfa74('0x12'),_0x48ffb4,_0x28b21d['error'][_0xfa74('0x11')]);return _0xd66310(_0x28b21d['error'][_0xfa74('0x11')]);}else{logger[_0xfa74('0xb')](_0xfa74('0x12'),_0x48ffb4,_0xfa74('0xc'));_0xd66310(_0x28b21d[_0xfa74('0x13')]['message']);}})[_0xfa74('0x14')](function(_0x2b8074){logger[_0xfa74('0x10')](_0xfa74('0x12'),_0x48ffb4,_0x2b8074);_0x49668b(_0x2b8074);});});}
\ No newline at end of file
+var _0x1b10=['Network,\x20%s,\x20%s','message','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','info','request\x20sent','debug','Network,\x20%s,\x20%s,\x20%s','error','code'];(function(_0x270a4e,_0x478486){var _0x2d73d5=function(_0x33a8b3){while(--_0x33a8b3){_0x270a4e['push'](_0x270a4e['shift']());}};_0x2d73d5(++_0x478486);}(_0x1b10,0xac));var _0x01b1=function(_0x259556,_0x488aca){_0x259556=_0x259556-0x0;var _0x5009de=_0x1b10[_0x259556];return _0x5009de;};'use strict';var _=require(_0x01b1('0x0'));var util=require('util');var moment=require(_0x01b1('0x1'));var BPromise=require(_0x01b1('0x2'));var rs=require(_0x01b1('0x3'));var fs=require('fs');var Redis=require(_0x01b1('0x4'));var db=require(_0x01b1('0x5'))['db'];var utils=require(_0x01b1('0x6'));var logger=require(_0x01b1('0x7'))(_0x01b1('0x8'));var config=require(_0x01b1('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x01b1('0xa')][_0x01b1('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x230515,_0x4c7082,_0x537425){return new BPromise(function(_0x2ecfd9,_0x4e3917){return client[_0x01b1('0xc')](_0x230515,_0x537425)[_0x01b1('0xd')](function(_0x392ea1){logger[_0x01b1('0xe')]('Network,\x20%s,\x20%s',_0x4c7082,_0x01b1('0xf'));logger[_0x01b1('0x10')](_0x01b1('0x11'),_0x4c7082,'request\x20sent',JSON['stringify'](_0x392ea1));if(_0x392ea1[_0x01b1('0x12')]){if(_0x392ea1[_0x01b1('0x12')][_0x01b1('0x13')]===0x1f4){logger[_0x01b1('0x12')](_0x01b1('0x14'),_0x4c7082,_0x392ea1[_0x01b1('0x12')]['message']);return _0x4e3917(_0x392ea1[_0x01b1('0x12')]['message']);}logger[_0x01b1('0x12')]('Network,\x20%s,\x20%s',_0x4c7082,_0x392ea1[_0x01b1('0x12')]['message']);return _0x2ecfd9(_0x392ea1['error'][_0x01b1('0x15')]);}else{logger[_0x01b1('0xe')](_0x01b1('0x14'),_0x4c7082,_0x01b1('0xf'));_0x2ecfd9(_0x392ea1[_0x01b1('0x16')][_0x01b1('0x15')]);}})[_0x01b1('0x17')](function(_0x5747c2){logger['error'](_0x01b1('0x14'),_0x4c7082,_0x5747c2);_0x4e3917(_0x5747c2);});});}
\ No newline at end of file