Built motion from commit (unavailable).|2.5.11
[motion2.git] / server / api / integration / integration.rpc.js
index f1ad7df..5c21daa 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf2d7=['code','message','result','catch','lodash','moment','bluebird','randomstring','ioredis','rpc','jayson/promise','request','then','info','Integration,\x20%s,\x20%s','request\x20sent','Integration,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x21b8ec,_0x2520ea){var _0xb0329b=function(_0x567a88){while(--_0x567a88){_0x21b8ec['push'](_0x21b8ec['shift']());}};_0xb0329b(++_0x2520ea);}(_0xf2d7,0x121));var _0x7f2d=function(_0x2963f4,_0x16cb08){_0x2963f4=_0x2963f4-0x0;var _0x375372=_0xf2d7[_0x2963f4];return _0x375372;};'use strict';var _=require(_0x7f2d('0x0'));var util=require('util');var moment=require(_0x7f2d('0x1'));var BPromise=require(_0x7f2d('0x2'));var rs=require(_0x7f2d('0x3'));var fs=require('fs');var Redis=require(_0x7f2d('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x7f2d('0x5'));var config=require('../../config/environment');var jayson=require(_0x7f2d('0x6'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x403e14,_0x4c8ea8,_0x111c2a){return new BPromise(function(_0x5490e0,_0x19a398){return client[_0x7f2d('0x7')](_0x403e14,_0x111c2a)[_0x7f2d('0x8')](function(_0x24457b){logger[_0x7f2d('0x9')](_0x7f2d('0xa'),_0x4c8ea8,_0x7f2d('0xb'));logger['debug'](_0x7f2d('0xc'),_0x4c8ea8,_0x7f2d('0xb'),JSON[_0x7f2d('0xd')](_0x24457b));if(_0x24457b[_0x7f2d('0xe')]){if(_0x24457b['error'][_0x7f2d('0xf')]===0x1f4){logger[_0x7f2d('0xe')](_0x7f2d('0xa'),_0x4c8ea8,_0x24457b['error'][_0x7f2d('0x10')]);return _0x19a398(_0x24457b['error'][_0x7f2d('0x10')]);}logger['error'](_0x7f2d('0xa'),_0x4c8ea8,_0x24457b['error']['message']);return _0x5490e0(_0x24457b[_0x7f2d('0xe')][_0x7f2d('0x10')]);}else{logger['info'](_0x7f2d('0xa'),_0x4c8ea8,'request\x20sent');_0x5490e0(_0x24457b[_0x7f2d('0x11')][_0x7f2d('0x10')]);}})[_0x7f2d('0x12')](function(_0xe1217b){logger['error'](_0x7f2d('0xa'),_0x4c8ea8,_0xe1217b);_0x19a398(_0xe1217b);});});}
\ No newline at end of file
+var _0x776f=['../../config/environment','jayson/promise','http','request','then','info','request\x20sent','debug','Integration,\x20%s,\x20%s,\x20%s','stringify','error','code','Integration,\x20%s,\x20%s','message','result','catch','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger'];(function(_0x4565bf,_0x5ad9d6){var _0x5610ba=function(_0x170988){while(--_0x170988){_0x4565bf['push'](_0x4565bf['shift']());}};_0x5610ba(++_0x5ad9d6);}(_0x776f,0x68));var _0xf776=function(_0x1d77c8,_0x474bcf){_0x1d77c8=_0x1d77c8-0x0;var _0x3efd70=_0x776f[_0x1d77c8];return _0x3efd70;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xf776('0x0'));var BPromise=require(_0xf776('0x1'));var rs=require(_0xf776('0x2'));var fs=require('fs');var Redis=require(_0xf776('0x3'));var db=require(_0xf776('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xf776('0x5'))('rpc');var config=require(_0xf776('0x6'));var jayson=require(_0xf776('0x7'));var client=jayson['client'][_0xf776('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x1c3877,_0x55d8e6,_0x2d7515){return new BPromise(function(_0x21ac6c,_0x52a0fc){return client[_0xf776('0x9')](_0x1c3877,_0x2d7515)[_0xf776('0xa')](function(_0x4b0f41){logger[_0xf776('0xb')]('Integration,\x20%s,\x20%s',_0x55d8e6,_0xf776('0xc'));logger[_0xf776('0xd')](_0xf776('0xe'),_0x55d8e6,_0xf776('0xc'),JSON[_0xf776('0xf')](_0x4b0f41));if(_0x4b0f41[_0xf776('0x10')]){if(_0x4b0f41['error'][_0xf776('0x11')]===0x1f4){logger['error'](_0xf776('0x12'),_0x55d8e6,_0x4b0f41[_0xf776('0x10')][_0xf776('0x13')]);return _0x52a0fc(_0x4b0f41['error'][_0xf776('0x13')]);}logger['error'](_0xf776('0x12'),_0x55d8e6,_0x4b0f41[_0xf776('0x10')][_0xf776('0x13')]);return _0x21ac6c(_0x4b0f41['error']['message']);}else{logger[_0xf776('0xb')](_0xf776('0x12'),_0x55d8e6,'request\x20sent');_0x21ac6c(_0x4b0f41[_0xf776('0x14')][_0xf776('0x13')]);}})[_0xf776('0x15')](function(_0xd5f3c2){logger[_0xf776('0x10')](_0xf776('0x12'),_0x55d8e6,_0xd5f3c2);_0x52a0fc(_0xd5f3c2);});});}
\ No newline at end of file