Built motion from commit (unavailable).|2.5.23
[motion2.git] / server / api / condition / condition.rpc.js
index bb0d550..3e47264 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 _0xf85c=['catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','request\x20sent','Condition,\x20%s,\x20%s,\x20%s','stringify','error','Condition,\x20%s,\x20%s','message','result'];(function(_0x3e1b3f,_0x19bdc7){var _0x33b963=function(_0x2543ce){while(--_0x2543ce){_0x3e1b3f['push'](_0x3e1b3f['shift']());}};_0x33b963(++_0x19bdc7);}(_0xf85c,0x8b));var _0xcf85=function(_0x2e4aa2,_0x11956a){_0x2e4aa2=_0x2e4aa2-0x0;var _0x5e6092=_0xf85c[_0x2e4aa2];return _0x5e6092;};'use strict';var _=require('lodash');var util=require(_0xcf85('0x0'));var moment=require(_0xcf85('0x1'));var BPromise=require(_0xcf85('0x2'));var rs=require(_0xcf85('0x3'));var fs=require('fs');var Redis=require(_0xcf85('0x4'));var db=require(_0xcf85('0x5'))['db'];var utils=require(_0xcf85('0x6'));var logger=require(_0xcf85('0x7'))(_0xcf85('0x8'));var config=require(_0xcf85('0x9'));var jayson=require(_0xcf85('0xa'));var client=jayson[_0xcf85('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x5add41,_0x40ff2d,_0xbdf02e){return new BPromise(function(_0x31dedb,_0x177299){return client[_0xcf85('0xc')](_0x5add41,_0xbdf02e)[_0xcf85('0xd')](function(_0xe2d18a){logger[_0xcf85('0xe')]('Condition,\x20%s,\x20%s',_0x40ff2d,_0xcf85('0xf'));logger['debug'](_0xcf85('0x10'),_0x40ff2d,_0xcf85('0xf'),JSON[_0xcf85('0x11')](_0xe2d18a));if(_0xe2d18a[_0xcf85('0x12')]){if(_0xe2d18a[_0xcf85('0x12')]['code']===0x1f4){logger['error'](_0xcf85('0x13'),_0x40ff2d,_0xe2d18a[_0xcf85('0x12')]['message']);return _0x177299(_0xe2d18a[_0xcf85('0x12')]['message']);}logger['error']('Condition,\x20%s,\x20%s',_0x40ff2d,_0xe2d18a['error']['message']);return _0x31dedb(_0xe2d18a[_0xcf85('0x12')][_0xcf85('0x14')]);}else{logger['info'](_0xcf85('0x13'),_0x40ff2d,_0xcf85('0xf'));_0x31dedb(_0xe2d18a[_0xcf85('0x15')][_0xcf85('0x14')]);}})[_0xcf85('0x16')](function(_0x235684){logger[_0xcf85('0x12')](_0xcf85('0x13'),_0x40ff2d,_0x235684);_0x177299(_0x235684);});});}
\ No newline at end of file