Built motion from commit 9e1399f3.|2.5.37
[motion2.git] / server / api / condition / condition.rpc.js
index bb0d550..b0b71b5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x58e6=['moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','request\x20sent','debug','stringify','error','code','Condition,\x20%s,\x20%s','message','info','result','catch','lodash','util'];(function(_0x451a55,_0xd6ad0){var _0x2a87aa=function(_0xdf2ada){while(--_0xdf2ada){_0x451a55['push'](_0x451a55['shift']());}};_0x2a87aa(++_0xd6ad0);}(_0x58e6,0x163));var _0x658e=function(_0x17055c,_0x424184){_0x17055c=_0x17055c-0x0;var _0x4a8a09=_0x58e6[_0x17055c];return _0x4a8a09;};'use strict';var _=require(_0x658e('0x0'));var util=require(_0x658e('0x1'));var moment=require(_0x658e('0x2'));var BPromise=require(_0x658e('0x3'));var rs=require(_0x658e('0x4'));var fs=require('fs');var Redis=require(_0x658e('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x658e('0x6'));var logger=require(_0x658e('0x7'))('rpc');var config=require(_0x658e('0x8'));var jayson=require(_0x658e('0x9'));var client=jayson[_0x658e('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x10191c,_0x2ac481,_0x885d41){return new BPromise(function(_0x5cfdab,_0x1c56b4){return client['request'](_0x10191c,_0x885d41)['then'](function(_0x166f07){logger['info']('Condition,\x20%s,\x20%s',_0x2ac481,_0x658e('0xb'));logger[_0x658e('0xc')]('Condition,\x20%s,\x20%s,\x20%s',_0x2ac481,_0x658e('0xb'),JSON[_0x658e('0xd')](_0x166f07));if(_0x166f07[_0x658e('0xe')]){if(_0x166f07[_0x658e('0xe')][_0x658e('0xf')]===0x1f4){logger['error'](_0x658e('0x10'),_0x2ac481,_0x166f07[_0x658e('0xe')][_0x658e('0x11')]);return _0x1c56b4(_0x166f07[_0x658e('0xe')][_0x658e('0x11')]);}logger[_0x658e('0xe')](_0x658e('0x10'),_0x2ac481,_0x166f07[_0x658e('0xe')][_0x658e('0x11')]);return _0x5cfdab(_0x166f07[_0x658e('0xe')][_0x658e('0x11')]);}else{logger[_0x658e('0x12')](_0x658e('0x10'),_0x2ac481,_0x658e('0xb'));_0x5cfdab(_0x166f07[_0x658e('0x13')][_0x658e('0x11')]);}})[_0x658e('0x14')](function(_0x3817ce){logger['error'](_0x658e('0x10'),_0x2ac481,_0x3817ce);_0x1c56b4(_0x3817ce);});});}
\ No newline at end of file
+var _0x73a8=['ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','request','then','info','Condition,\x20%s,\x20%s','request\x20sent','Condition,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x73a8,0x103));var _0x873a=function(_0x9474d9,_0x29c7e3){_0x9474d9=_0x9474d9-0x0;var _0x2ebcd7=_0x73a8[_0x9474d9];return _0x2ebcd7;};'use strict';var _=require(_0x873a('0x0'));var util=require(_0x873a('0x1'));var moment=require(_0x873a('0x2'));var BPromise=require(_0x873a('0x3'));var rs=require(_0x873a('0x4'));var fs=require('fs');var Redis=require(_0x873a('0x5'));var db=require(_0x873a('0x6'))['db'];var utils=require(_0x873a('0x7'));var logger=require(_0x873a('0x8'))(_0x873a('0x9'));var config=require(_0x873a('0xa'));var jayson=require(_0x873a('0xb'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x87b60a,_0x33359d,_0x4cbf80){return new BPromise(function(_0x3c19f9,_0x7f7f7d){return client[_0x873a('0xc')](_0x87b60a,_0x4cbf80)[_0x873a('0xd')](function(_0x4e15cd){logger[_0x873a('0xe')](_0x873a('0xf'),_0x33359d,_0x873a('0x10'));logger['debug'](_0x873a('0x11'),_0x33359d,_0x873a('0x10'),JSON[_0x873a('0x12')](_0x4e15cd));if(_0x4e15cd[_0x873a('0x13')]){if(_0x4e15cd[_0x873a('0x13')][_0x873a('0x14')]===0x1f4){logger[_0x873a('0x13')](_0x873a('0xf'),_0x33359d,_0x4e15cd[_0x873a('0x13')][_0x873a('0x15')]);return _0x7f7f7d(_0x4e15cd[_0x873a('0x13')][_0x873a('0x15')]);}logger[_0x873a('0x13')](_0x873a('0xf'),_0x33359d,_0x4e15cd[_0x873a('0x13')][_0x873a('0x15')]);return _0x3c19f9(_0x4e15cd[_0x873a('0x13')]['message']);}else{logger[_0x873a('0xe')](_0x873a('0xf'),_0x33359d,'request\x20sent');_0x3c19f9(_0x4e15cd[_0x873a('0x16')]['message']);}})[_0x873a('0x17')](function(_0x49d89a){logger[_0x873a('0x13')](_0x873a('0xf'),_0x33359d,_0x49d89a);_0x7f7f7d(_0x49d89a);});});}
\ No newline at end of file