Built motion from commit e6806ed6.|2.6.0
[motion2.git] / server / api / cloudProvider / cloudProvider.rpc.js
index 9f453e6..5a461ef 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1269=['rpc','../../config/environment','jayson/promise','client','http','request','info','request\x20sent','debug','CloudProvider,\x20%s,\x20%s,\x20%s','stringify','error','code','CloudProvider,\x20%s,\x20%s','message','result','moment','bluebird','randomstring','ioredis'];(function(_0xbe1fd0,_0x1cc3be){var _0x37ab42=function(_0x362422){while(--_0x362422){_0xbe1fd0['push'](_0xbe1fd0['shift']());}};_0x37ab42(++_0x1cc3be);}(_0x1269,0xb0));var _0x9126=function(_0x590861,_0x42c7f3){_0x590861=_0x590861-0x0;var _0x1d0a80=_0x1269[_0x590861];return _0x1d0a80;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x9126('0x0'));var BPromise=require(_0x9126('0x1'));var rs=require(_0x9126('0x2'));var fs=require('fs');var Redis=require(_0x9126('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x9126('0x4'));var config=require(_0x9126('0x5'));var jayson=require(_0x9126('0x6'));var client=jayson[_0x9126('0x7')][_0x9126('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x291aa3,_0x14bddd,_0x14b493){return new BPromise(function(_0x21a302,_0x568481){return client[_0x9126('0x9')](_0x291aa3,_0x14b493)['then'](function(_0x3d8f66){logger[_0x9126('0xa')]('CloudProvider,\x20%s,\x20%s',_0x14bddd,_0x9126('0xb'));logger[_0x9126('0xc')](_0x9126('0xd'),_0x14bddd,_0x9126('0xb'),JSON[_0x9126('0xe')](_0x3d8f66));if(_0x3d8f66[_0x9126('0xf')]){if(_0x3d8f66[_0x9126('0xf')][_0x9126('0x10')]===0x1f4){logger[_0x9126('0xf')](_0x9126('0x11'),_0x14bddd,_0x3d8f66[_0x9126('0xf')][_0x9126('0x12')]);return _0x568481(_0x3d8f66[_0x9126('0xf')]['message']);}logger[_0x9126('0xf')](_0x9126('0x11'),_0x14bddd,_0x3d8f66[_0x9126('0xf')][_0x9126('0x12')]);return _0x21a302(_0x3d8f66[_0x9126('0xf')][_0x9126('0x12')]);}else{logger[_0x9126('0xa')](_0x9126('0x11'),_0x14bddd,_0x9126('0xb'));_0x21a302(_0x3d8f66[_0x9126('0x13')][_0x9126('0x12')]);}})['catch'](function(_0x3eff9b){logger[_0x9126('0xf')]('CloudProvider,\x20%s,\x20%s',_0x14bddd,_0x3eff9b);_0x568481(_0x3eff9b);});});}
\ No newline at end of file
+var _0xb78e=['randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','then','info','CloudProvider,\x20%s,\x20%s','request\x20sent','debug','CloudProvider,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','lodash','util','bluebird'];(function(_0x2f8125,_0x260435){var _0x332dfb=function(_0x12a258){while(--_0x12a258){_0x2f8125['push'](_0x2f8125['shift']());}};_0x332dfb(++_0x260435);}(_0xb78e,0x1c9));var _0xeb78=function(_0x263657,_0x37c8af){_0x263657=_0x263657-0x0;var _0x49c17b=_0xb78e[_0x263657];return _0x49c17b;};'use strict';var _=require(_0xeb78('0x0'));var util=require(_0xeb78('0x1'));var moment=require('moment');var BPromise=require(_0xeb78('0x2'));var rs=require(_0xeb78('0x3'));var fs=require('fs');var Redis=require(_0xeb78('0x4'));var db=require(_0xeb78('0x5'))['db'];var utils=require(_0xeb78('0x6'));var logger=require(_0xeb78('0x7'))(_0xeb78('0x8'));var config=require(_0xeb78('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xeb78('0xa')][_0xeb78('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x1ccc2f,_0x30c884,_0x2b7925){return new BPromise(function(_0x36963f,_0x5259aa){return client['request'](_0x1ccc2f,_0x2b7925)[_0xeb78('0xc')](function(_0x1c941d){logger[_0xeb78('0xd')](_0xeb78('0xe'),_0x30c884,_0xeb78('0xf'));logger[_0xeb78('0x10')](_0xeb78('0x11'),_0x30c884,_0xeb78('0xf'),JSON[_0xeb78('0x12')](_0x1c941d));if(_0x1c941d['error']){if(_0x1c941d[_0xeb78('0x13')][_0xeb78('0x14')]===0x1f4){logger[_0xeb78('0x13')](_0xeb78('0xe'),_0x30c884,_0x1c941d[_0xeb78('0x13')][_0xeb78('0x15')]);return _0x5259aa(_0x1c941d[_0xeb78('0x13')][_0xeb78('0x15')]);}logger[_0xeb78('0x13')](_0xeb78('0xe'),_0x30c884,_0x1c941d['error'][_0xeb78('0x15')]);return _0x36963f(_0x1c941d[_0xeb78('0x13')]['message']);}else{logger['info']('CloudProvider,\x20%s,\x20%s',_0x30c884,_0xeb78('0xf'));_0x36963f(_0x1c941d['result'][_0xeb78('0x15')]);}})[_0xeb78('0x16')](function(_0x49123d){logger[_0xeb78('0x13')]('CloudProvider,\x20%s,\x20%s',_0x30c884,_0x49123d);_0x5259aa(_0x49123d);});});}
\ No newline at end of file