Built motion from commit ff78e754.|2.6.29
[motion2.git] / server / api / condition / condition.rpc.js
index be0e2e3..b147bba 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0720=['request\x20sent','Condition,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','lodash','util','moment','../../mysqldb','../../config/utils','../../config/logger','rpc','client','request','then','info','Condition,\x20%s,\x20%s'];(function(_0x43d423,_0x1d8b9f){var _0x593791=function(_0x2d480b){while(--_0x2d480b){_0x43d423['push'](_0x43d423['shift']());}};_0x593791(++_0x1d8b9f);}(_0x0720,0x9f));var _0x0072=function(_0x22f8c3,_0x3e20f6){_0x22f8c3=_0x22f8c3-0x0;var _0x27c170=_0x0720[_0x22f8c3];return _0x27c170;};'use strict';var _=require(_0x0072('0x0'));var util=require(_0x0072('0x1'));var moment=require(_0x0072('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x0072('0x3'))['db'];var utils=require(_0x0072('0x4'));var logger=require(_0x0072('0x5'))(_0x0072('0x6'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x0072('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x183e68,_0x217192,_0x55407e){return new BPromise(function(_0x25eda6,_0x3b4856){return client[_0x0072('0x8')](_0x183e68,_0x55407e)[_0x0072('0x9')](function(_0x5eb27c){logger[_0x0072('0xa')](_0x0072('0xb'),_0x217192,_0x0072('0xc'));logger['debug'](_0x0072('0xd'),_0x217192,_0x0072('0xc'),JSON['stringify'](_0x5eb27c));if(_0x5eb27c[_0x0072('0xe')]){if(_0x5eb27c[_0x0072('0xe')][_0x0072('0xf')]===0x1f4){logger['error']('Condition,\x20%s,\x20%s',_0x217192,_0x5eb27c[_0x0072('0xe')][_0x0072('0x10')]);return _0x3b4856(_0x5eb27c[_0x0072('0xe')]['message']);}logger['error'](_0x0072('0xb'),_0x217192,_0x5eb27c[_0x0072('0xe')][_0x0072('0x10')]);return _0x25eda6(_0x5eb27c[_0x0072('0xe')][_0x0072('0x10')]);}else{logger['info'](_0x0072('0xb'),_0x217192,_0x0072('0xc'));_0x25eda6(_0x5eb27c[_0x0072('0x11')]['message']);}})[_0x0072('0x12')](function(_0x3f3594){logger[_0x0072('0xe')]('Condition,\x20%s,\x20%s',_0x217192,_0x3f3594);_0x3b4856(_0x3f3594);});});}
\ No newline at end of file
+var _0xf551=['Condition,\x20%s,\x20%s,\x20%s','stringify','error','code','Condition,\x20%s,\x20%s','message','request\x20sent','result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','request','info'];(function(_0x54955f,_0x1be52a){var _0x38c98c=function(_0x4522ac){while(--_0x4522ac){_0x54955f['push'](_0x54955f['shift']());}};_0x38c98c(++_0x1be52a);}(_0xf551,0x1c2));var _0x1f55=function(_0x5bd8f7,_0x16d5bc){_0x5bd8f7=_0x5bd8f7-0x0;var _0x5c9842=_0xf551[_0x5bd8f7];return _0x5c9842;};'use strict';var _=require(_0x1f55('0x0'));var util=require(_0x1f55('0x1'));var moment=require(_0x1f55('0x2'));var BPromise=require('bluebird');var rs=require(_0x1f55('0x3'));var fs=require('fs');var Redis=require(_0x1f55('0x4'));var db=require(_0x1f55('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x1f55('0x6'))(_0x1f55('0x7'));var config=require(_0x1f55('0x8'));var jayson=require(_0x1f55('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x42de5a,_0x16ab4d,_0x5a2ff7){return new BPromise(function(_0x88b4fe,_0x1b8f73){return client[_0x1f55('0xa')](_0x42de5a,_0x5a2ff7)['then'](function(_0x2f9f48){logger[_0x1f55('0xb')]('Condition,\x20%s,\x20%s',_0x16ab4d,'request\x20sent');logger['debug'](_0x1f55('0xc'),_0x16ab4d,'request\x20sent',JSON[_0x1f55('0xd')](_0x2f9f48));if(_0x2f9f48[_0x1f55('0xe')]){if(_0x2f9f48[_0x1f55('0xe')][_0x1f55('0xf')]===0x1f4){logger[_0x1f55('0xe')](_0x1f55('0x10'),_0x16ab4d,_0x2f9f48['error'][_0x1f55('0x11')]);return _0x1b8f73(_0x2f9f48[_0x1f55('0xe')][_0x1f55('0x11')]);}logger[_0x1f55('0xe')](_0x1f55('0x10'),_0x16ab4d,_0x2f9f48[_0x1f55('0xe')][_0x1f55('0x11')]);return _0x88b4fe(_0x2f9f48[_0x1f55('0xe')][_0x1f55('0x11')]);}else{logger[_0x1f55('0xb')](_0x1f55('0x10'),_0x16ab4d,_0x1f55('0x12'));_0x88b4fe(_0x2f9f48[_0x1f55('0x13')][_0x1f55('0x11')]);}})[_0x1f55('0x14')](function(_0x11ce56){logger[_0x1f55('0xe')]('Condition,\x20%s,\x20%s',_0x16ab4d,_0x11ce56);_0x1b8f73(_0x11ce56);});});}
\ No newline at end of file