Built motion from commit da24aabd.|2.6.20
[motion2.git] / server / api / cloudProvider / cloudProvider.rpc.js
index 101b69a..b6b96fb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x297f=['request','info','CloudProvider,\x20%s,\x20%s','request\x20sent','debug','error','code','message','result','catch','lodash','util','moment','randomstring','ioredis','../../config/utils','../../config/environment','jayson/promise','client','http'];(function(_0x324df8,_0x4db988){var _0x4b593a=function(_0xdf1737){while(--_0xdf1737){_0x324df8['push'](_0x324df8['shift']());}};_0x4b593a(++_0x4db988);}(_0x297f,0x15e));var _0xf297=function(_0x2c8d11,_0x1e4251){_0x2c8d11=_0x2c8d11-0x0;var _0x44e0cc=_0x297f[_0x2c8d11];return _0x44e0cc;};'use strict';var _=require(_0xf297('0x0'));var util=require(_0xf297('0x1'));var moment=require(_0xf297('0x2'));var BPromise=require('bluebird');var rs=require(_0xf297('0x3'));var fs=require('fs');var Redis=require(_0xf297('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xf297('0x5'));var logger=require('../../config/logger')('rpc');var config=require(_0xf297('0x6'));var jayson=require(_0xf297('0x7'));var client=jayson[_0xf297('0x8')][_0xf297('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2a24a7,_0x4a89f6,_0x462334){return new BPromise(function(_0x41c7c3,_0x4856c3){return client[_0xf297('0xa')](_0x2a24a7,_0x462334)['then'](function(_0x510fcd){logger[_0xf297('0xb')](_0xf297('0xc'),_0x4a89f6,_0xf297('0xd'));logger[_0xf297('0xe')]('CloudProvider,\x20%s,\x20%s,\x20%s',_0x4a89f6,_0xf297('0xd'),JSON['stringify'](_0x510fcd));if(_0x510fcd[_0xf297('0xf')]){if(_0x510fcd[_0xf297('0xf')][_0xf297('0x10')]===0x1f4){logger[_0xf297('0xf')](_0xf297('0xc'),_0x4a89f6,_0x510fcd[_0xf297('0xf')][_0xf297('0x11')]);return _0x4856c3(_0x510fcd[_0xf297('0xf')][_0xf297('0x11')]);}logger['error'](_0xf297('0xc'),_0x4a89f6,_0x510fcd[_0xf297('0xf')][_0xf297('0x11')]);return _0x41c7c3(_0x510fcd[_0xf297('0xf')][_0xf297('0x11')]);}else{logger['info'](_0xf297('0xc'),_0x4a89f6,'request\x20sent');_0x41c7c3(_0x510fcd[_0xf297('0x12')][_0xf297('0x11')]);}})[_0xf297('0x13')](function(_0xb19b73){logger[_0xf297('0xf')](_0xf297('0xc'),_0x4a89f6,_0xb19b73);_0x4856c3(_0xb19b73);});});}
\ No newline at end of file
+var _0xcd4d=['http','then','CloudProvider,\x20%s,\x20%s','request\x20sent','debug','CloudProvider,\x20%s,\x20%s,\x20%s','error','code','message','info','result','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client'];(function(_0x40ac5e,_0x2de228){var _0x2839d6=function(_0x123d47){while(--_0x123d47){_0x40ac5e['push'](_0x40ac5e['shift']());}};_0x2839d6(++_0x2de228);}(_0xcd4d,0xe4));var _0xdcd4=function(_0xa1b35b,_0x39fee5){_0xa1b35b=_0xa1b35b-0x0;var _0xd6942e=_0xcd4d[_0xa1b35b];return _0xd6942e;};'use strict';var _=require(_0xdcd4('0x0'));var util=require(_0xdcd4('0x1'));var moment=require('moment');var BPromise=require(_0xdcd4('0x2'));var rs=require(_0xdcd4('0x3'));var fs=require('fs');var Redis=require(_0xdcd4('0x4'));var db=require(_0xdcd4('0x5'))['db'];var utils=require(_0xdcd4('0x6'));var logger=require(_0xdcd4('0x7'))(_0xdcd4('0x8'));var config=require(_0xdcd4('0x9'));var jayson=require(_0xdcd4('0xa'));var client=jayson[_0xdcd4('0xb')][_0xdcd4('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x302b60,_0x5b57f6,_0x17f848){return new BPromise(function(_0x198d6c,_0xc0cf59){return client['request'](_0x302b60,_0x17f848)[_0xdcd4('0xd')](function(_0x3cae6d){logger['info'](_0xdcd4('0xe'),_0x5b57f6,_0xdcd4('0xf'));logger[_0xdcd4('0x10')](_0xdcd4('0x11'),_0x5b57f6,_0xdcd4('0xf'),JSON['stringify'](_0x3cae6d));if(_0x3cae6d[_0xdcd4('0x12')]){if(_0x3cae6d[_0xdcd4('0x12')][_0xdcd4('0x13')]===0x1f4){logger[_0xdcd4('0x12')](_0xdcd4('0xe'),_0x5b57f6,_0x3cae6d['error'][_0xdcd4('0x14')]);return _0xc0cf59(_0x3cae6d[_0xdcd4('0x12')]['message']);}logger[_0xdcd4('0x12')](_0xdcd4('0xe'),_0x5b57f6,_0x3cae6d['error']['message']);return _0x198d6c(_0x3cae6d[_0xdcd4('0x12')][_0xdcd4('0x14')]);}else{logger[_0xdcd4('0x15')](_0xdcd4('0xe'),_0x5b57f6,_0xdcd4('0xf'));_0x198d6c(_0x3cae6d[_0xdcd4('0x16')][_0xdcd4('0x14')]);}})[_0xdcd4('0x17')](function(_0xf57175){logger[_0xdcd4('0x12')](_0xdcd4('0xe'),_0x5b57f6,_0xf57175);_0xc0cf59(_0xf57175);});});}
\ No newline at end of file