Built motion from commit 9d0783e6.|2.6.13
[motion2.git] / server / api / tag / tag.rpc.js
index 3a4bf97..092d86b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x37f8=['catch','util','moment','bluebird','randomstring','../../mysqldb','client','http','request','then','info','Tag,\x20%s,\x20%s','request\x20sent','debug','Tag,\x20%s,\x20%s,\x20%s','stringify','error','code','message'];(function(_0xfedc72,_0x292f02){var _0x2c7c78=function(_0x12fbf1){while(--_0x12fbf1){_0xfedc72['push'](_0xfedc72['shift']());}};_0x2c7c78(++_0x292f02);}(_0x37f8,0xd2));var _0x837f=function(_0x4c64b5,_0x188653){_0x4c64b5=_0x4c64b5-0x0;var _0x244f8f=_0x37f8[_0x4c64b5];return _0x244f8f;};'use strict';var _=require('lodash');var util=require(_0x837f('0x0'));var moment=require(_0x837f('0x1'));var BPromise=require(_0x837f('0x2'));var rs=require(_0x837f('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x837f('0x4'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x837f('0x5')][_0x837f('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x224ad2,_0x40270f,_0x4111cb){return new BPromise(function(_0x25bbcb,_0x12c732){return client[_0x837f('0x7')](_0x224ad2,_0x4111cb)[_0x837f('0x8')](function(_0x2f1dc7){logger[_0x837f('0x9')](_0x837f('0xa'),_0x40270f,_0x837f('0xb'));logger[_0x837f('0xc')](_0x837f('0xd'),_0x40270f,'request\x20sent',JSON[_0x837f('0xe')](_0x2f1dc7));if(_0x2f1dc7[_0x837f('0xf')]){if(_0x2f1dc7[_0x837f('0xf')][_0x837f('0x10')]===0x1f4){logger[_0x837f('0xf')]('Tag,\x20%s,\x20%s',_0x40270f,_0x2f1dc7['error'][_0x837f('0x11')]);return _0x12c732(_0x2f1dc7[_0x837f('0xf')][_0x837f('0x11')]);}logger[_0x837f('0xf')](_0x837f('0xa'),_0x40270f,_0x2f1dc7['error'][_0x837f('0x11')]);return _0x25bbcb(_0x2f1dc7[_0x837f('0xf')][_0x837f('0x11')]);}else{logger[_0x837f('0x9')](_0x837f('0xa'),_0x40270f,_0x837f('0xb'));_0x25bbcb(_0x2f1dc7['result'][_0x837f('0x11')]);}})[_0x837f('0x12')](function(_0x47bbe7){logger[_0x837f('0xf')](_0x837f('0xa'),_0x40270f,_0x47bbe7);_0x12c732(_0x47bbe7);});});}
\ No newline at end of file
+var _0x79a8=['message','result','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','Tag,\x20%s,\x20%s','request\x20sent','Tag,\x20%s,\x20%s,\x20%s','error','code'];(function(_0x21a9d9,_0x4d5ac8){var _0x46adce=function(_0xfdd336){while(--_0xfdd336){_0x21a9d9['push'](_0x21a9d9['shift']());}};_0x46adce(++_0x4d5ac8);}(_0x79a8,0x1d0));var _0x879a=function(_0x4e1926,_0x2415d6){_0x4e1926=_0x4e1926-0x0;var _0x85fa41=_0x79a8[_0x4e1926];return _0x85fa41;};'use strict';var _=require(_0x879a('0x0'));var util=require('util');var moment=require(_0x879a('0x1'));var BPromise=require(_0x879a('0x2'));var rs=require(_0x879a('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x879a('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x879a('0x5'))(_0x879a('0x6'));var config=require(_0x879a('0x7'));var jayson=require(_0x879a('0x8'));var client=jayson[_0x879a('0x9')][_0x879a('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x1d353e,_0x2427bf,_0x4bf3ab){return new BPromise(function(_0xe27fe6,_0x5cb5c9){return client[_0x879a('0xb')](_0x1d353e,_0x4bf3ab)[_0x879a('0xc')](function(_0x5eba04){logger[_0x879a('0xd')](_0x879a('0xe'),_0x2427bf,_0x879a('0xf'));logger['debug'](_0x879a('0x10'),_0x2427bf,_0x879a('0xf'),JSON['stringify'](_0x5eba04));if(_0x5eba04['error']){if(_0x5eba04[_0x879a('0x11')][_0x879a('0x12')]===0x1f4){logger[_0x879a('0x11')](_0x879a('0xe'),_0x2427bf,_0x5eba04['error'][_0x879a('0x13')]);return _0x5cb5c9(_0x5eba04[_0x879a('0x11')][_0x879a('0x13')]);}logger[_0x879a('0x11')](_0x879a('0xe'),_0x2427bf,_0x5eba04[_0x879a('0x11')][_0x879a('0x13')]);return _0xe27fe6(_0x5eba04[_0x879a('0x11')][_0x879a('0x13')]);}else{logger[_0x879a('0xd')]('Tag,\x20%s,\x20%s',_0x2427bf,'request\x20sent');_0xe27fe6(_0x5eba04[_0x879a('0x14')][_0x879a('0x13')]);}})['catch'](function(_0x119260){logger[_0x879a('0x11')](_0x879a('0xe'),_0x2427bf,_0x119260);_0x5cb5c9(_0x119260);});});}
\ No newline at end of file