Built motion from commit (unavailable).|2.5.23
[motion2.git] / server / api / cloudProvider / cloudProvider.rpc.js
index 4b47bbf..ad375e8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2b84=['info','CloudProvider,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','then'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x2b84,0x8e));var _0x42b8=function(_0x31e29a,_0x349c9b){_0x31e29a=_0x31e29a-0x0;var _0x32d892=_0x2b84[_0x31e29a];return _0x32d892;};'use strict';var _=require('lodash');var util=require(_0x42b8('0x0'));var moment=require(_0x42b8('0x1'));var BPromise=require(_0x42b8('0x2'));var rs=require(_0x42b8('0x3'));var fs=require('fs');var Redis=require(_0x42b8('0x4'));var db=require(_0x42b8('0x5'))['db'];var utils=require(_0x42b8('0x6'));var logger=require(_0x42b8('0x7'))(_0x42b8('0x8'));var config=require(_0x42b8('0x9'));var jayson=require(_0x42b8('0xa'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x3770b1,_0x184fc7,_0x33cc21){return new BPromise(function(_0x4a40da,_0x538a70){return client['request'](_0x3770b1,_0x33cc21)[_0x42b8('0xb')](function(_0x4f3da9){logger[_0x42b8('0xc')](_0x42b8('0xd'),_0x184fc7,_0x42b8('0xe'));logger[_0x42b8('0xf')]('CloudProvider,\x20%s,\x20%s,\x20%s',_0x184fc7,'request\x20sent',JSON[_0x42b8('0x10')](_0x4f3da9));if(_0x4f3da9[_0x42b8('0x11')]){if(_0x4f3da9[_0x42b8('0x11')][_0x42b8('0x12')]===0x1f4){logger[_0x42b8('0x11')]('CloudProvider,\x20%s,\x20%s',_0x184fc7,_0x4f3da9[_0x42b8('0x11')][_0x42b8('0x13')]);return _0x538a70(_0x4f3da9[_0x42b8('0x11')][_0x42b8('0x13')]);}logger[_0x42b8('0x11')](_0x42b8('0xd'),_0x184fc7,_0x4f3da9[_0x42b8('0x11')]['message']);return _0x4a40da(_0x4f3da9[_0x42b8('0x11')][_0x42b8('0x13')]);}else{logger[_0x42b8('0xc')](_0x42b8('0xd'),_0x184fc7,_0x42b8('0xe'));_0x4a40da(_0x4f3da9[_0x42b8('0x14')][_0x42b8('0x13')]);}})[_0x42b8('0x15')](function(_0x565ed7){logger[_0x42b8('0x11')](_0x42b8('0xd'),_0x184fc7,_0x565ed7);_0x538a70(_0x565ed7);});});}
\ No newline at end of file
+var _0x6f72=['CloudProvider,\x20%s,\x20%s','request\x20sent','CloudProvider,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','lodash','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http','request','info'];(function(_0x2962d5,_0x38deda){var _0x273406=function(_0x3e0775){while(--_0x3e0775){_0x2962d5['push'](_0x2962d5['shift']());}};_0x273406(++_0x38deda);}(_0x6f72,0x198));var _0x26f7=function(_0x563707,_0x3f98ea){_0x563707=_0x563707-0x0;var _0x3b936c=_0x6f72[_0x563707];return _0x3b936c;};'use strict';var _=require(_0x26f7('0x0'));var util=require('util');var moment=require(_0x26f7('0x1'));var BPromise=require(_0x26f7('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x26f7('0x3'));var db=require(_0x26f7('0x4'))['db'];var utils=require(_0x26f7('0x5'));var logger=require(_0x26f7('0x6'))('rpc');var config=require(_0x26f7('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x26f7('0x8')][_0x26f7('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1a81b1,_0x1c12cd,_0x26cca3){return new BPromise(function(_0x19ca7d,_0x5155f3){return client[_0x26f7('0xa')](_0x1a81b1,_0x26cca3)['then'](function(_0x5ee358){logger[_0x26f7('0xb')](_0x26f7('0xc'),_0x1c12cd,_0x26f7('0xd'));logger['debug'](_0x26f7('0xe'),_0x1c12cd,_0x26f7('0xd'),JSON[_0x26f7('0xf')](_0x5ee358));if(_0x5ee358['error']){if(_0x5ee358[_0x26f7('0x10')][_0x26f7('0x11')]===0x1f4){logger[_0x26f7('0x10')](_0x26f7('0xc'),_0x1c12cd,_0x5ee358['error']['message']);return _0x5155f3(_0x5ee358['error'][_0x26f7('0x12')]);}logger[_0x26f7('0x10')](_0x26f7('0xc'),_0x1c12cd,_0x5ee358['error']['message']);return _0x19ca7d(_0x5ee358[_0x26f7('0x10')]['message']);}else{logger['info'](_0x26f7('0xc'),_0x1c12cd,_0x26f7('0xd'));_0x19ca7d(_0x5ee358['result'][_0x26f7('0x12')]);}})[_0x26f7('0x13')](function(_0x4ffdf9){logger[_0x26f7('0x10')](_0x26f7('0xc'),_0x1c12cd,_0x4ffdf9);_0x5155f3(_0x4ffdf9);});});}
\ No newline at end of file