Built motion from commit (unavailable).|2.5.29
[motion2.git] / server / api / network / network.rpc.js
index a2c7333..c15cf22 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x108b=['rpc','../../config/environment','jayson/promise','http','request','info','Network,\x20%s,\x20%s','request\x20sent','Network,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','util','bluebird','randomstring','../../config/logger'];(function(_0x490be3,_0xf0fca3){var _0x3f5140=function(_0x15fa80){while(--_0x15fa80){_0x490be3['push'](_0x490be3['shift']());}};_0x3f5140(++_0xf0fca3);}(_0x108b,0x105));var _0xb108=function(_0x4817f9,_0x4070d1){_0x4817f9=_0x4817f9-0x0;var _0x2dcfa6=_0x108b[_0x4817f9];return _0x2dcfa6;};'use strict';var _=require(_0xb108('0x0'));var util=require(_0xb108('0x1'));var moment=require('moment');var BPromise=require(_0xb108('0x2'));var rs=require(_0xb108('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xb108('0x4'))(_0xb108('0x5'));var config=require(_0xb108('0x6'));var jayson=require(_0xb108('0x7'));var client=jayson['client'][_0xb108('0x8')]({'port':0x232a});function respondWithRpcPromise(_0xffe586,_0x1b2967,_0x45777c){return new BPromise(function(_0x749221,_0x230fbb){return client[_0xb108('0x9')](_0xffe586,_0x45777c)['then'](function(_0x124900){logger[_0xb108('0xa')](_0xb108('0xb'),_0x1b2967,_0xb108('0xc'));logger['debug'](_0xb108('0xd'),_0x1b2967,'request\x20sent',JSON[_0xb108('0xe')](_0x124900));if(_0x124900[_0xb108('0xf')]){if(_0x124900[_0xb108('0xf')]['code']===0x1f4){logger[_0xb108('0xf')](_0xb108('0xb'),_0x1b2967,_0x124900[_0xb108('0xf')][_0xb108('0x10')]);return _0x230fbb(_0x124900[_0xb108('0xf')][_0xb108('0x10')]);}logger['error']('Network,\x20%s,\x20%s',_0x1b2967,_0x124900['error'][_0xb108('0x10')]);return _0x749221(_0x124900[_0xb108('0xf')][_0xb108('0x10')]);}else{logger[_0xb108('0xa')](_0xb108('0xb'),_0x1b2967,_0xb108('0xc'));_0x749221(_0x124900[_0xb108('0x11')][_0xb108('0x10')]);}})[_0xb108('0x12')](function(_0x237b03){logger[_0xb108('0xf')](_0xb108('0xb'),_0x1b2967,_0x237b03);_0x230fbb(_0x237b03);});});}
\ No newline at end of file
+var _0xf221=['randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','request\x20sent','debug','stringify','error','message','Network,\x20%s,\x20%s','catch','lodash','util','moment'];(function(_0x1c0b78,_0x39bd33){var _0x44ed21=function(_0x563fd5){while(--_0x563fd5){_0x1c0b78['push'](_0x1c0b78['shift']());}};_0x44ed21(++_0x39bd33);}(_0xf221,0xef));var _0x1f22=function(_0x554e67,_0x4c0085){_0x554e67=_0x554e67-0x0;var _0x213f42=_0xf221[_0x554e67];return _0x213f42;};'use strict';var _=require(_0x1f22('0x0'));var util=require(_0x1f22('0x1'));var moment=require(_0x1f22('0x2'));var BPromise=require('bluebird');var rs=require(_0x1f22('0x3'));var fs=require('fs');var Redis=require(_0x1f22('0x4'));var db=require(_0x1f22('0x5'))['db'];var utils=require(_0x1f22('0x6'));var logger=require(_0x1f22('0x7'))(_0x1f22('0x8'));var config=require(_0x1f22('0x9'));var jayson=require(_0x1f22('0xa'));var client=jayson[_0x1f22('0xb')][_0x1f22('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x43336e,_0x52c8ff,_0x1ed55e){return new BPromise(function(_0x1882da,_0x46b431){return client[_0x1f22('0xd')](_0x43336e,_0x1ed55e)['then'](function(_0x2de98a){logger[_0x1f22('0xe')]('Network,\x20%s,\x20%s',_0x52c8ff,_0x1f22('0xf'));logger[_0x1f22('0x10')]('Network,\x20%s,\x20%s,\x20%s',_0x52c8ff,_0x1f22('0xf'),JSON[_0x1f22('0x11')](_0x2de98a));if(_0x2de98a[_0x1f22('0x12')]){if(_0x2de98a['error']['code']===0x1f4){logger['error']('Network,\x20%s,\x20%s',_0x52c8ff,_0x2de98a['error'][_0x1f22('0x13')]);return _0x46b431(_0x2de98a[_0x1f22('0x12')][_0x1f22('0x13')]);}logger[_0x1f22('0x12')](_0x1f22('0x14'),_0x52c8ff,_0x2de98a['error'][_0x1f22('0x13')]);return _0x1882da(_0x2de98a[_0x1f22('0x12')][_0x1f22('0x13')]);}else{logger['info']('Network,\x20%s,\x20%s',_0x52c8ff,_0x1f22('0xf'));_0x1882da(_0x2de98a['result'][_0x1f22('0x13')]);}})[_0x1f22('0x15')](function(_0x17a8e8){logger[_0x1f22('0x12')]('Network,\x20%s,\x20%s',_0x52c8ff,_0x17a8e8);_0x46b431(_0x17a8e8);});});}
\ No newline at end of file