Built motion from commit 9d1906d1.|2.5.40
[motion2.git] / server / api / integration / integration.rpc.js
index 2329bc9..f629ece 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4f29=['../../config/logger','rpc','../../config/environment','jayson/promise','info','request\x20sent','debug','Integration,\x20%s,\x20%s,\x20%s','error','code','Integration,\x20%s,\x20%s','message','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x9fb081,_0x48f480){var _0x43f8b0=function(_0x418570){while(--_0x418570){_0x9fb081['push'](_0x9fb081['shift']());}};_0x43f8b0(++_0x48f480);}(_0x4f29,0xfd));var _0x94f2=function(_0x1da356,_0xde6358){_0x1da356=_0x1da356-0x0;var _0x55d26a=_0x4f29[_0x1da356];return _0x55d26a;};'use strict';var _=require('lodash');var util=require(_0x94f2('0x0'));var moment=require(_0x94f2('0x1'));var BPromise=require(_0x94f2('0x2'));var rs=require(_0x94f2('0x3'));var fs=require('fs');var Redis=require(_0x94f2('0x4'));var db=require(_0x94f2('0x5'))['db'];var utils=require(_0x94f2('0x6'));var logger=require(_0x94f2('0x7'))(_0x94f2('0x8'));var config=require(_0x94f2('0x9'));var jayson=require(_0x94f2('0xa'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0xe14ba5,_0x4042b1,_0x1d1910){return new BPromise(function(_0x224a93,_0x3eca06){return client['request'](_0xe14ba5,_0x1d1910)['then'](function(_0x5bc91c){logger[_0x94f2('0xb')]('Integration,\x20%s,\x20%s',_0x4042b1,_0x94f2('0xc'));logger[_0x94f2('0xd')](_0x94f2('0xe'),_0x4042b1,_0x94f2('0xc'),JSON['stringify'](_0x5bc91c));if(_0x5bc91c[_0x94f2('0xf')]){if(_0x5bc91c[_0x94f2('0xf')][_0x94f2('0x10')]===0x1f4){logger[_0x94f2('0xf')](_0x94f2('0x11'),_0x4042b1,_0x5bc91c[_0x94f2('0xf')][_0x94f2('0x12')]);return _0x3eca06(_0x5bc91c['error'][_0x94f2('0x12')]);}logger['error'](_0x94f2('0x11'),_0x4042b1,_0x5bc91c[_0x94f2('0xf')][_0x94f2('0x12')]);return _0x224a93(_0x5bc91c['error']['message']);}else{logger[_0x94f2('0xb')](_0x94f2('0x11'),_0x4042b1,_0x94f2('0xc'));_0x224a93(_0x5bc91c['result'][_0x94f2('0x12')]);}})[_0x94f2('0x13')](function(_0x5ae9d2){logger['error'](_0x94f2('0x11'),_0x4042b1,_0x5ae9d2);_0x3eca06(_0x5ae9d2);});});}
\ No newline at end of file
+var _0x0b0e=['Integration,\x20%s,\x20%s,\x20%s','stringify','error','message','request\x20sent','result','catch','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','Integration,\x20%s,\x20%s','debug'];(function(_0x5af59e,_0x3771c1){var _0x4240df=function(_0x2267fd){while(--_0x2267fd){_0x5af59e['push'](_0x5af59e['shift']());}};_0x4240df(++_0x3771c1);}(_0x0b0e,0x187));var _0xe0b0=function(_0x571c1d,_0x3b0586){_0x571c1d=_0x571c1d-0x0;var _0x33c609=_0x0b0e[_0x571c1d];return _0x33c609;};'use strict';var _=require(_0xe0b0('0x0'));var util=require('util');var moment=require(_0xe0b0('0x1'));var BPromise=require('bluebird');var rs=require(_0xe0b0('0x2'));var fs=require('fs');var Redis=require(_0xe0b0('0x3'));var db=require(_0xe0b0('0x4'))['db'];var utils=require(_0xe0b0('0x5'));var logger=require(_0xe0b0('0x6'))(_0xe0b0('0x7'));var config=require(_0xe0b0('0x8'));var jayson=require(_0xe0b0('0x9'));var client=jayson[_0xe0b0('0xa')][_0xe0b0('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x219b1c,_0x5cf9cc,_0x50be7f){return new BPromise(function(_0x11effc,_0x435060){return client[_0xe0b0('0xc')](_0x219b1c,_0x50be7f)[_0xe0b0('0xd')](function(_0x4c24f9){logger[_0xe0b0('0xe')](_0xe0b0('0xf'),_0x5cf9cc,'request\x20sent');logger[_0xe0b0('0x10')](_0xe0b0('0x11'),_0x5cf9cc,'request\x20sent',JSON[_0xe0b0('0x12')](_0x4c24f9));if(_0x4c24f9[_0xe0b0('0x13')]){if(_0x4c24f9[_0xe0b0('0x13')]['code']===0x1f4){logger[_0xe0b0('0x13')](_0xe0b0('0xf'),_0x5cf9cc,_0x4c24f9[_0xe0b0('0x13')][_0xe0b0('0x14')]);return _0x435060(_0x4c24f9[_0xe0b0('0x13')]['message']);}logger[_0xe0b0('0x13')](_0xe0b0('0xf'),_0x5cf9cc,_0x4c24f9[_0xe0b0('0x13')][_0xe0b0('0x14')]);return _0x11effc(_0x4c24f9[_0xe0b0('0x13')]['message']);}else{logger[_0xe0b0('0xe')]('Integration,\x20%s,\x20%s',_0x5cf9cc,_0xe0b0('0x15'));_0x11effc(_0x4c24f9[_0xe0b0('0x16')]['message']);}})[_0xe0b0('0x17')](function(_0x4a4cc0){logger[_0xe0b0('0x13')](_0xe0b0('0xf'),_0x5cf9cc,_0x4a4cc0);_0x435060(_0x4a4cc0);});});}
\ No newline at end of file