Built motion from commit (unavailable).|2.5.20
[motion2.git] / server / api / condition / condition.rpc.js
index 095af34..b21008d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xae47=['http','request','then','info','request\x20sent','debug','error','code','Condition,\x20%s,\x20%s','message','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client'];(function(_0x4dadba,_0x2ed5e6){var _0x373bb0=function(_0x28e6dc){while(--_0x28e6dc){_0x4dadba['push'](_0x4dadba['shift']());}};_0x373bb0(++_0x2ed5e6);}(_0xae47,0x155));var _0x7ae4=function(_0x3cd10,_0x4a03fe){_0x3cd10=_0x3cd10-0x0;var _0x4b64c7=_0xae47[_0x3cd10];return _0x4b64c7;};'use strict';var _=require(_0x7ae4('0x0'));var util=require(_0x7ae4('0x1'));var moment=require('moment');var BPromise=require(_0x7ae4('0x2'));var rs=require(_0x7ae4('0x3'));var fs=require('fs');var Redis=require(_0x7ae4('0x4'));var db=require(_0x7ae4('0x5'))['db'];var utils=require(_0x7ae4('0x6'));var logger=require('../../config/logger')(_0x7ae4('0x7'));var config=require(_0x7ae4('0x8'));var jayson=require(_0x7ae4('0x9'));var client=jayson[_0x7ae4('0xa')][_0x7ae4('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x3915d0,_0x1f7701,_0x2f6d1b){return new BPromise(function(_0x9ba163,_0x171930){return client[_0x7ae4('0xc')](_0x3915d0,_0x2f6d1b)[_0x7ae4('0xd')](function(_0x2418bc){logger[_0x7ae4('0xe')]('Condition,\x20%s,\x20%s',_0x1f7701,_0x7ae4('0xf'));logger[_0x7ae4('0x10')]('Condition,\x20%s,\x20%s,\x20%s',_0x1f7701,_0x7ae4('0xf'),JSON['stringify'](_0x2418bc));if(_0x2418bc[_0x7ae4('0x11')]){if(_0x2418bc[_0x7ae4('0x11')][_0x7ae4('0x12')]===0x1f4){logger[_0x7ae4('0x11')](_0x7ae4('0x13'),_0x1f7701,_0x2418bc[_0x7ae4('0x11')][_0x7ae4('0x14')]);return _0x171930(_0x2418bc[_0x7ae4('0x11')][_0x7ae4('0x14')]);}logger[_0x7ae4('0x11')]('Condition,\x20%s,\x20%s',_0x1f7701,_0x2418bc[_0x7ae4('0x11')][_0x7ae4('0x14')]);return _0x9ba163(_0x2418bc[_0x7ae4('0x11')]['message']);}else{logger[_0x7ae4('0xe')](_0x7ae4('0x13'),_0x1f7701,_0x7ae4('0xf'));_0x9ba163(_0x2418bc['result'][_0x7ae4('0x14')]);}})[_0x7ae4('0x15')](function(_0x2cfc01){logger[_0x7ae4('0x11')](_0x7ae4('0x13'),_0x1f7701,_0x2cfc01);_0x171930(_0x2cfc01);});});}
\ No newline at end of file
+var _0xfd2f=['bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','then','info','Condition,\x20%s,\x20%s','request\x20sent','debug','Condition,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util'];(function(_0x3833fd,_0x3d4f6a){var _0x111c26=function(_0x703aa8){while(--_0x703aa8){_0x3833fd['push'](_0x3833fd['shift']());}};_0x111c26(++_0x3d4f6a);}(_0xfd2f,0x166));var _0xffd2=function(_0x24b862,_0x3b8bb2){_0x24b862=_0x24b862-0x0;var _0x3a3714=_0xfd2f[_0x24b862];return _0x3a3714;};'use strict';var _=require(_0xffd2('0x0'));var util=require(_0xffd2('0x1'));var moment=require('moment');var BPromise=require(_0xffd2('0x2'));var rs=require(_0xffd2('0x3'));var fs=require('fs');var Redis=require(_0xffd2('0x4'));var db=require(_0xffd2('0x5'))['db'];var utils=require(_0xffd2('0x6'));var logger=require(_0xffd2('0x7'))(_0xffd2('0x8'));var config=require(_0xffd2('0x9'));var jayson=require(_0xffd2('0xa'));var client=jayson['client'][_0xffd2('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x2e0315,_0x3abaed,_0x1681ae){return new BPromise(function(_0x50ea5a,_0x4abb94){return client['request'](_0x2e0315,_0x1681ae)[_0xffd2('0xc')](function(_0x593db0){logger[_0xffd2('0xd')](_0xffd2('0xe'),_0x3abaed,_0xffd2('0xf'));logger[_0xffd2('0x10')](_0xffd2('0x11'),_0x3abaed,_0xffd2('0xf'),JSON[_0xffd2('0x12')](_0x593db0));if(_0x593db0[_0xffd2('0x13')]){if(_0x593db0['error'][_0xffd2('0x14')]===0x1f4){logger[_0xffd2('0x13')](_0xffd2('0xe'),_0x3abaed,_0x593db0[_0xffd2('0x13')][_0xffd2('0x15')]);return _0x4abb94(_0x593db0[_0xffd2('0x13')][_0xffd2('0x15')]);}logger[_0xffd2('0x13')](_0xffd2('0xe'),_0x3abaed,_0x593db0['error']['message']);return _0x50ea5a(_0x593db0['error'][_0xffd2('0x15')]);}else{logger[_0xffd2('0xd')](_0xffd2('0xe'),_0x3abaed,'request\x20sent');_0x50ea5a(_0x593db0[_0xffd2('0x16')][_0xffd2('0x15')]);}})[_0xffd2('0x17')](function(_0x430395){logger['error']('Condition,\x20%s,\x20%s',_0x3abaed,_0x430395);_0x4abb94(_0x430395);});});}
\ No newline at end of file