Built motion from commit (unavailable).|2.5.9
[motion2.git] / server / api / cloudProvider / cloudProvider.rpc.js
index 4e0f421..484217a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4682=['request','info','CloudProvider,\x20%s,\x20%s','request\x20sent','CloudProvider,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','moment','randomstring','ioredis','rpc','../../config/environment','jayson/promise','client','http'];(function(_0x1e2bf0,_0x2f8c8f){var _0x219560=function(_0x1db30f){while(--_0x1db30f){_0x1e2bf0['push'](_0x1e2bf0['shift']());}};_0x219560(++_0x2f8c8f);}(_0x4682,0xe7));var _0x2468=function(_0x35da42,_0x5c2610){_0x35da42=_0x35da42-0x0;var _0x370035=_0x4682[_0x35da42];return _0x370035;};'use strict';var _=require(_0x2468('0x0'));var util=require('util');var moment=require(_0x2468('0x1'));var BPromise=require('bluebird');var rs=require(_0x2468('0x2'));var fs=require('fs');var Redis=require(_0x2468('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x2468('0x4'));var config=require(_0x2468('0x5'));var jayson=require(_0x2468('0x6'));var client=jayson[_0x2468('0x7')][_0x2468('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x2511f7,_0x53d248,_0x3ea71b){return new BPromise(function(_0x52f62d,_0x5bac69){return client[_0x2468('0x9')](_0x2511f7,_0x3ea71b)['then'](function(_0x326295){logger[_0x2468('0xa')](_0x2468('0xb'),_0x53d248,_0x2468('0xc'));logger['debug'](_0x2468('0xd'),_0x53d248,_0x2468('0xc'),JSON[_0x2468('0xe')](_0x326295));if(_0x326295[_0x2468('0xf')]){if(_0x326295[_0x2468('0xf')][_0x2468('0x10')]===0x1f4){logger['error']('CloudProvider,\x20%s,\x20%s',_0x53d248,_0x326295['error'][_0x2468('0x11')]);return _0x5bac69(_0x326295['error'][_0x2468('0x11')]);}logger['error'](_0x2468('0xb'),_0x53d248,_0x326295['error'][_0x2468('0x11')]);return _0x52f62d(_0x326295[_0x2468('0xf')][_0x2468('0x11')]);}else{logger[_0x2468('0xa')](_0x2468('0xb'),_0x53d248,'request\x20sent');_0x52f62d(_0x326295[_0x2468('0x12')][_0x2468('0x11')]);}})[_0x2468('0x13')](function(_0x2937f2){logger[_0x2468('0xf')](_0x2468('0xb'),_0x53d248,_0x2937f2);_0x5bac69(_0x2937f2);});});}
\ No newline at end of file
+var _0xd4ae=['ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','debug','CloudProvider,\x20%s,\x20%s,\x20%s','stringify','error','CloudProvider,\x20%s,\x20%s','message','result','catch','lodash','moment','bluebird'];(function(_0x4cfb78,_0x4c1da6){var _0xc1250e=function(_0x217b6c){while(--_0x217b6c){_0x4cfb78['push'](_0x4cfb78['shift']());}};_0xc1250e(++_0x4c1da6);}(_0xd4ae,0x87));var _0xed4a=function(_0x1c37fe,_0x10a098){_0x1c37fe=_0x1c37fe-0x0;var _0x45e904=_0xd4ae[_0x1c37fe];return _0x45e904;};'use strict';var _=require(_0xed4a('0x0'));var util=require('util');var moment=require(_0xed4a('0x1'));var BPromise=require(_0xed4a('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xed4a('0x3'));var db=require(_0xed4a('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xed4a('0x5'))(_0xed4a('0x6'));var config=require(_0xed4a('0x7'));var jayson=require(_0xed4a('0x8'));var client=jayson[_0xed4a('0x9')][_0xed4a('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x5cf4b2,_0x1fa655,_0x33af8a){return new BPromise(function(_0x4d477f,_0x1d1e7b){return client[_0xed4a('0xb')](_0x5cf4b2,_0x33af8a)[_0xed4a('0xc')](function(_0x21c1e2){logger[_0xed4a('0xd')]('CloudProvider,\x20%s,\x20%s',_0x1fa655,_0xed4a('0xe'));logger[_0xed4a('0xf')](_0xed4a('0x10'),_0x1fa655,_0xed4a('0xe'),JSON[_0xed4a('0x11')](_0x21c1e2));if(_0x21c1e2[_0xed4a('0x12')]){if(_0x21c1e2[_0xed4a('0x12')]['code']===0x1f4){logger[_0xed4a('0x12')](_0xed4a('0x13'),_0x1fa655,_0x21c1e2['error'][_0xed4a('0x14')]);return _0x1d1e7b(_0x21c1e2[_0xed4a('0x12')][_0xed4a('0x14')]);}logger[_0xed4a('0x12')]('CloudProvider,\x20%s,\x20%s',_0x1fa655,_0x21c1e2[_0xed4a('0x12')]['message']);return _0x4d477f(_0x21c1e2['error'][_0xed4a('0x14')]);}else{logger[_0xed4a('0xd')](_0xed4a('0x13'),_0x1fa655,_0xed4a('0xe'));_0x4d477f(_0x21c1e2[_0xed4a('0x15')][_0xed4a('0x14')]);}})[_0xed4a('0x16')](function(_0x359bac){logger[_0xed4a('0x12')](_0xed4a('0x13'),_0x1fa655,_0x359bac);_0x1d1e7b(_0x359bac);});});}
\ No newline at end of file