Built motion from commit e6806ed6.|2.6.0
[motion2.git] / server / api / cloudProvider / cloudProvider.rpc.js
index 41094d7..5a461ef 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x075d=['../../config/logger','../../config/environment','client','http','request','request\x20sent','debug','CloudProvider,\x20%s,\x20%s,\x20%s','stringify','error','CloudProvider,\x20%s,\x20%s','message','catch','util','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x3efccb,_0x8671ae){var _0x7e7d97=function(_0x310154){while(--_0x310154){_0x3efccb['push'](_0x3efccb['shift']());}};_0x7e7d97(++_0x8671ae);}(_0x075d,0x1bd));var _0xd075=function(_0x5cd10b,_0x15558b){_0x5cd10b=_0x5cd10b-0x0;var _0x3eb360=_0x075d[_0x5cd10b];return _0x3eb360;};'use strict';var _=require('lodash');var util=require(_0xd075('0x0'));var moment=require('moment');var BPromise=require(_0xd075('0x1'));var rs=require(_0xd075('0x2'));var fs=require('fs');var Redis=require(_0xd075('0x3'));var db=require(_0xd075('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xd075('0x5'))('rpc');var config=require(_0xd075('0x6'));var jayson=require('jayson/promise');var client=jayson[_0xd075('0x7')][_0xd075('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x287b98,_0x385045,_0x17ebaf){return new BPromise(function(_0x5a2cf3,_0x582efe){return client[_0xd075('0x9')](_0x287b98,_0x17ebaf)['then'](function(_0xf5e3cf){logger['info']('CloudProvider,\x20%s,\x20%s',_0x385045,_0xd075('0xa'));logger[_0xd075('0xb')](_0xd075('0xc'),_0x385045,_0xd075('0xa'),JSON[_0xd075('0xd')](_0xf5e3cf));if(_0xf5e3cf[_0xd075('0xe')]){if(_0xf5e3cf[_0xd075('0xe')]['code']===0x1f4){logger[_0xd075('0xe')](_0xd075('0xf'),_0x385045,_0xf5e3cf[_0xd075('0xe')][_0xd075('0x10')]);return _0x582efe(_0xf5e3cf[_0xd075('0xe')][_0xd075('0x10')]);}logger[_0xd075('0xe')](_0xd075('0xf'),_0x385045,_0xf5e3cf[_0xd075('0xe')]['message']);return _0x5a2cf3(_0xf5e3cf['error'][_0xd075('0x10')]);}else{logger['info'](_0xd075('0xf'),_0x385045,'request\x20sent');_0x5a2cf3(_0xf5e3cf['result'][_0xd075('0x10')]);}})[_0xd075('0x11')](function(_0x41de14){logger[_0xd075('0xe')](_0xd075('0xf'),_0x385045,_0x41de14);_0x582efe(_0x41de14);});});}
\ 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