Built motion from commit 85328c08.|2.5.50
[motion2.git] / server / api / condition / condition.rpc.js
index 590853a..3cde075 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfc9c=['catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','Condition,\x20%s,\x20%s','request\x20sent','debug','Condition,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result'];(function(_0x445179,_0x389247){var _0x36626f=function(_0x54ca4e){while(--_0x54ca4e){_0x445179['push'](_0x445179['shift']());}};_0x36626f(++_0x389247);}(_0xfc9c,0x15f));var _0xcfc9=function(_0x4cea7d,_0x50f55b){_0x4cea7d=_0x4cea7d-0x0;var _0x36e72a=_0xfc9c[_0x4cea7d];return _0x36e72a;};'use strict';var _=require(_0xcfc9('0x0'));var util=require(_0xcfc9('0x1'));var moment=require(_0xcfc9('0x2'));var BPromise=require('bluebird');var rs=require(_0xcfc9('0x3'));var fs=require('fs');var Redis=require(_0xcfc9('0x4'));var db=require(_0xcfc9('0x5'))['db'];var utils=require(_0xcfc9('0x6'));var logger=require(_0xcfc9('0x7'))(_0xcfc9('0x8'));var config=require(_0xcfc9('0x9'));var jayson=require(_0xcfc9('0xa'));var client=jayson[_0xcfc9('0xb')][_0xcfc9('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x1f6a0a,_0x4ce56a,_0x1173a1){return new BPromise(function(_0x23384a,_0x143b99){return client[_0xcfc9('0xd')](_0x1f6a0a,_0x1173a1)['then'](function(_0x5e1ff3){logger['info'](_0xcfc9('0xe'),_0x4ce56a,_0xcfc9('0xf'));logger[_0xcfc9('0x10')](_0xcfc9('0x11'),_0x4ce56a,_0xcfc9('0xf'),JSON[_0xcfc9('0x12')](_0x5e1ff3));if(_0x5e1ff3[_0xcfc9('0x13')]){if(_0x5e1ff3[_0xcfc9('0x13')][_0xcfc9('0x14')]===0x1f4){logger[_0xcfc9('0x13')](_0xcfc9('0xe'),_0x4ce56a,_0x5e1ff3['error']['message']);return _0x143b99(_0x5e1ff3[_0xcfc9('0x13')][_0xcfc9('0x15')]);}logger[_0xcfc9('0x13')](_0xcfc9('0xe'),_0x4ce56a,_0x5e1ff3[_0xcfc9('0x13')]['message']);return _0x23384a(_0x5e1ff3[_0xcfc9('0x13')][_0xcfc9('0x15')]);}else{logger[_0xcfc9('0x16')](_0xcfc9('0xe'),_0x4ce56a,_0xcfc9('0xf'));_0x23384a(_0x5e1ff3[_0xcfc9('0x17')][_0xcfc9('0x15')]);}})[_0xcfc9('0x18')](function(_0x2e3690){logger[_0xcfc9('0x13')](_0xcfc9('0xe'),_0x4ce56a,_0x2e3690);_0x143b99(_0x2e3690);});});}
\ No newline at end of file
+var _0xfc64=['../../config/logger','../../config/environment','jayson/promise','client','http','request','info','Condition,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','catch','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x243b59,_0x3f9495){var _0x3e1676=function(_0x354052){while(--_0x354052){_0x243b59['push'](_0x243b59['shift']());}};_0x3e1676(++_0x3f9495);}(_0xfc64,0x135));var _0x4fc6=function(_0x59c301,_0x359c50){_0x59c301=_0x59c301-0x0;var _0x3866b9=_0xfc64[_0x59c301];return _0x3866b9;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x4fc6('0x0'));var BPromise=require(_0x4fc6('0x1'));var rs=require(_0x4fc6('0x2'));var fs=require('fs');var Redis=require(_0x4fc6('0x3'));var db=require(_0x4fc6('0x4'))['db'];var utils=require(_0x4fc6('0x5'));var logger=require(_0x4fc6('0x6'))('rpc');var config=require(_0x4fc6('0x7'));var jayson=require(_0x4fc6('0x8'));var client=jayson[_0x4fc6('0x9')][_0x4fc6('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x328110,_0x541f0e,_0x32409b){return new BPromise(function(_0x47e79e,_0x239835){return client[_0x4fc6('0xb')](_0x328110,_0x32409b)['then'](function(_0x204925){logger[_0x4fc6('0xc')](_0x4fc6('0xd'),_0x541f0e,_0x4fc6('0xe'));logger[_0x4fc6('0xf')]('Condition,\x20%s,\x20%s,\x20%s',_0x541f0e,_0x4fc6('0xe'),JSON[_0x4fc6('0x10')](_0x204925));if(_0x204925[_0x4fc6('0x11')]){if(_0x204925[_0x4fc6('0x11')]['code']===0x1f4){logger[_0x4fc6('0x11')](_0x4fc6('0xd'),_0x541f0e,_0x204925[_0x4fc6('0x11')][_0x4fc6('0x12')]);return _0x239835(_0x204925[_0x4fc6('0x11')][_0x4fc6('0x12')]);}logger['error'](_0x4fc6('0xd'),_0x541f0e,_0x204925[_0x4fc6('0x11')][_0x4fc6('0x12')]);return _0x47e79e(_0x204925['error'][_0x4fc6('0x12')]);}else{logger[_0x4fc6('0xc')](_0x4fc6('0xd'),_0x541f0e,'request\x20sent');_0x47e79e(_0x204925[_0x4fc6('0x13')][_0x4fc6('0x12')]);}})[_0x4fc6('0x14')](function(_0x1fe5e1){logger['error']('Condition,\x20%s,\x20%s',_0x541f0e,_0x1fe5e1);_0x239835(_0x1fe5e1);});});}
\ No newline at end of file