Built motion from commit fade34fd.|2.5.41
[motion2.git] / server / api / cloudProvider / cloudProvider.rpc.js
index 2433b01..d725413 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9148=['../../config/utils','../../config/logger','rpc','../../config/environment','client','request','info','CloudProvider,\x20%s,\x20%s','request\x20sent','debug','stringify','code','error','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x1e202f,_0x2eebe4){var _0x4e6b92=function(_0x398a61){while(--_0x398a61){_0x1e202f['push'](_0x1e202f['shift']());}};_0x4e6b92(++_0x2eebe4);}(_0x9148,0x10d));var _0x8914=function(_0x2be7bd,_0x1c72bd){_0x2be7bd=_0x2be7bd-0x0;var _0x4818c0=_0x9148[_0x2be7bd];return _0x4818c0;};'use strict';var _=require(_0x8914('0x0'));var util=require(_0x8914('0x1'));var moment=require(_0x8914('0x2'));var BPromise=require(_0x8914('0x3'));var rs=require(_0x8914('0x4'));var fs=require('fs');var Redis=require(_0x8914('0x5'));var db=require(_0x8914('0x6'))['db'];var utils=require(_0x8914('0x7'));var logger=require(_0x8914('0x8'))(_0x8914('0x9'));var config=require(_0x8914('0xa'));var jayson=require('jayson/promise');var client=jayson[_0x8914('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1cd146,_0x58e892,_0x1b0445){return new BPromise(function(_0x15aff5,_0x1e2d12){return client[_0x8914('0xc')](_0x1cd146,_0x1b0445)['then'](function(_0x2e7aac){logger[_0x8914('0xd')](_0x8914('0xe'),_0x58e892,_0x8914('0xf'));logger[_0x8914('0x10')]('CloudProvider,\x20%s,\x20%s,\x20%s',_0x58e892,_0x8914('0xf'),JSON[_0x8914('0x11')](_0x2e7aac));if(_0x2e7aac['error']){if(_0x2e7aac['error'][_0x8914('0x12')]===0x1f4){logger[_0x8914('0x13')](_0x8914('0xe'),_0x58e892,_0x2e7aac[_0x8914('0x13')][_0x8914('0x14')]);return _0x1e2d12(_0x2e7aac[_0x8914('0x13')]['message']);}logger[_0x8914('0x13')](_0x8914('0xe'),_0x58e892,_0x2e7aac['error'][_0x8914('0x14')]);return _0x15aff5(_0x2e7aac[_0x8914('0x13')][_0x8914('0x14')]);}else{logger[_0x8914('0xd')](_0x8914('0xe'),_0x58e892,_0x8914('0xf'));_0x15aff5(_0x2e7aac[_0x8914('0x15')][_0x8914('0x14')]);}})[_0x8914('0x16')](function(_0x4ca130){logger[_0x8914('0x13')](_0x8914('0xe'),_0x58e892,_0x4ca130);_0x1e2d12(_0x4ca130);});});}
\ No newline at end of file
+var _0xb2f3=['message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','request\x20sent','debug','CloudProvider,\x20%s,\x20%s,\x20%s','stringify','error','code','CloudProvider,\x20%s,\x20%s'];(function(_0x12550b,_0xcfc7a6){var _0x509fd7=function(_0x492c7d){while(--_0x492c7d){_0x12550b['push'](_0x12550b['shift']());}};_0x509fd7(++_0xcfc7a6);}(_0xb2f3,0xfd));var _0x3b2f=function(_0x46698a,_0x8de1e4){_0x46698a=_0x46698a-0x0;var _0x356db0=_0xb2f3[_0x46698a];return _0x356db0;};'use strict';var _=require(_0x3b2f('0x0'));var util=require(_0x3b2f('0x1'));var moment=require(_0x3b2f('0x2'));var BPromise=require(_0x3b2f('0x3'));var rs=require(_0x3b2f('0x4'));var fs=require('fs');var Redis=require(_0x3b2f('0x5'));var db=require(_0x3b2f('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x3b2f('0x7'))(_0x3b2f('0x8'));var config=require(_0x3b2f('0x9'));var jayson=require(_0x3b2f('0xa'));var client=jayson[_0x3b2f('0xb')][_0x3b2f('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x26719d,_0x4b3632,_0x200ca4){return new BPromise(function(_0x56e425,_0x266ed2){return client[_0x3b2f('0xd')](_0x26719d,_0x200ca4)[_0x3b2f('0xe')](function(_0x25134f){logger['info']('CloudProvider,\x20%s,\x20%s',_0x4b3632,_0x3b2f('0xf'));logger[_0x3b2f('0x10')](_0x3b2f('0x11'),_0x4b3632,_0x3b2f('0xf'),JSON[_0x3b2f('0x12')](_0x25134f));if(_0x25134f[_0x3b2f('0x13')]){if(_0x25134f[_0x3b2f('0x13')][_0x3b2f('0x14')]===0x1f4){logger[_0x3b2f('0x13')](_0x3b2f('0x15'),_0x4b3632,_0x25134f[_0x3b2f('0x13')][_0x3b2f('0x16')]);return _0x266ed2(_0x25134f[_0x3b2f('0x13')][_0x3b2f('0x16')]);}logger[_0x3b2f('0x13')]('CloudProvider,\x20%s,\x20%s',_0x4b3632,_0x25134f[_0x3b2f('0x13')]['message']);return _0x56e425(_0x25134f[_0x3b2f('0x13')][_0x3b2f('0x16')]);}else{logger['info'](_0x3b2f('0x15'),_0x4b3632,'request\x20sent');_0x56e425(_0x25134f[_0x3b2f('0x17')][_0x3b2f('0x16')]);}})[_0x3b2f('0x18')](function(_0xd2b1e9){logger['error']('CloudProvider,\x20%s,\x20%s',_0x4b3632,_0xd2b1e9);_0x266ed2(_0xd2b1e9);});});}
\ No newline at end of file