Built motion from commit 00bf23f6.|2.6.16
[motion2.git] / server / api / condition / condition.rpc.js
index 37947d5..e311491 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x803f=['client','http','info','Condition,\x20%s,\x20%s','debug','request\x20sent','code','error','message','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x34ac63,_0x40f4da){var _0x44aee2=function(_0x5a1140){while(--_0x5a1140){_0x34ac63['push'](_0x34ac63['shift']());}};_0x44aee2(++_0x40f4da);}(_0x803f,0x10e));var _0xf803=function(_0x1a2793,_0x8c946d){_0x1a2793=_0x1a2793-0x0;var _0x580695=_0x803f[_0x1a2793];return _0x580695;};'use strict';var _=require(_0xf803('0x0'));var util=require('util');var moment=require(_0xf803('0x1'));var BPromise=require(_0xf803('0x2'));var rs=require(_0xf803('0x3'));var fs=require('fs');var Redis=require(_0xf803('0x4'));var db=require(_0xf803('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xf803('0x6'))(_0xf803('0x7'));var config=require(_0xf803('0x8'));var jayson=require(_0xf803('0x9'));var client=jayson[_0xf803('0xa')][_0xf803('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x1080ac,_0x3d7ccb,_0x32a09e){return new BPromise(function(_0x33f2b4,_0x5d83d3){return client['request'](_0x1080ac,_0x32a09e)['then'](function(_0x56dd99){logger[_0xf803('0xc')](_0xf803('0xd'),_0x3d7ccb,'request\x20sent');logger[_0xf803('0xe')]('Condition,\x20%s,\x20%s,\x20%s',_0x3d7ccb,_0xf803('0xf'),JSON['stringify'](_0x56dd99));if(_0x56dd99['error']){if(_0x56dd99['error'][_0xf803('0x10')]===0x1f4){logger[_0xf803('0x11')](_0xf803('0xd'),_0x3d7ccb,_0x56dd99[_0xf803('0x11')]['message']);return _0x5d83d3(_0x56dd99['error']['message']);}logger[_0xf803('0x11')](_0xf803('0xd'),_0x3d7ccb,_0x56dd99[_0xf803('0x11')][_0xf803('0x12')]);return _0x33f2b4(_0x56dd99[_0xf803('0x11')][_0xf803('0x12')]);}else{logger[_0xf803('0xc')](_0xf803('0xd'),_0x3d7ccb,'request\x20sent');_0x33f2b4(_0x56dd99['result'][_0xf803('0x12')]);}})[_0xf803('0x13')](function(_0x50e02a){logger[_0xf803('0x11')](_0xf803('0xd'),_0x3d7ccb,_0x50e02a);_0x5d83d3(_0x50e02a);});});}
\ No newline at end of file
+var _0x8fe7=['debug','Condition,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','info','Condition,\x20%s,\x20%s','request\x20sent'];(function(_0x31ca46,_0x1aaabd){var _0x46d55d=function(_0x31e536){while(--_0x31e536){_0x31ca46['push'](_0x31ca46['shift']());}};_0x46d55d(++_0x1aaabd);}(_0x8fe7,0x1e7));var _0x78fe=function(_0x56e4ba,_0x55da3e){_0x56e4ba=_0x56e4ba-0x0;var _0x5a501f=_0x8fe7[_0x56e4ba];return _0x5a501f;};'use strict';var _=require(_0x78fe('0x0'));var util=require(_0x78fe('0x1'));var moment=require(_0x78fe('0x2'));var BPromise=require(_0x78fe('0x3'));var rs=require(_0x78fe('0x4'));var fs=require('fs');var Redis=require(_0x78fe('0x5'));var db=require(_0x78fe('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x78fe('0x7'))(_0x78fe('0x8'));var config=require(_0x78fe('0x9'));var jayson=require(_0x78fe('0xa'));var client=jayson[_0x78fe('0xb')][_0x78fe('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x21ee9d,_0x3632eb,_0x30ee33){return new BPromise(function(_0x1d53a9,_0x9b2dc6){return client['request'](_0x21ee9d,_0x30ee33)[_0x78fe('0xd')](function(_0xced216){logger[_0x78fe('0xe')](_0x78fe('0xf'),_0x3632eb,_0x78fe('0x10'));logger[_0x78fe('0x11')](_0x78fe('0x12'),_0x3632eb,_0x78fe('0x10'),JSON['stringify'](_0xced216));if(_0xced216[_0x78fe('0x13')]){if(_0xced216[_0x78fe('0x13')][_0x78fe('0x14')]===0x1f4){logger['error'](_0x78fe('0xf'),_0x3632eb,_0xced216['error'][_0x78fe('0x15')]);return _0x9b2dc6(_0xced216[_0x78fe('0x13')][_0x78fe('0x15')]);}logger[_0x78fe('0x13')]('Condition,\x20%s,\x20%s',_0x3632eb,_0xced216['error'][_0x78fe('0x15')]);return _0x1d53a9(_0xced216[_0x78fe('0x13')][_0x78fe('0x15')]);}else{logger['info'](_0x78fe('0xf'),_0x3632eb,_0x78fe('0x10'));_0x1d53a9(_0xced216[_0x78fe('0x16')]['message']);}})[_0x78fe('0x17')](function(_0xc3ab52){logger['error']('Condition,\x20%s,\x20%s',_0x3632eb,_0xc3ab52);_0x9b2dc6(_0xc3ab52);});});}
\ No newline at end of file