Built motion from commit da617fac.|2.6.6
[motion2.git] / server / api / condition / condition.rpc.js
index 37947d5..389808c 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 _0x8a41=['http','then','info','debug','Condition,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','Condition,\x20%s,\x20%s','result','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/environment'];(function(_0x3a0380,_0x4014c8){var _0x162bbb=function(_0x59178c){while(--_0x59178c){_0x3a0380['push'](_0x3a0380['shift']());}};_0x162bbb(++_0x4014c8);}(_0x8a41,0xfc));var _0x18a4=function(_0x525067,_0x128b80){_0x525067=_0x525067-0x0;var _0x21ab1a=_0x8a41[_0x525067];return _0x21ab1a;};'use strict';var _=require(_0x18a4('0x0'));var util=require(_0x18a4('0x1'));var moment=require(_0x18a4('0x2'));var BPromise=require(_0x18a4('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x18a4('0x4'));var db=require(_0x18a4('0x5'))['db'];var utils=require(_0x18a4('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0x18a4('0x7'));var jayson=require('jayson/promise');var client=jayson['client'][_0x18a4('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x53533c,_0x58eb3d,_0x3fd42f){return new BPromise(function(_0x2900ea,_0x335c14){return client['request'](_0x53533c,_0x3fd42f)[_0x18a4('0x9')](function(_0x3efabf){logger[_0x18a4('0xa')]('Condition,\x20%s,\x20%s',_0x58eb3d,'request\x20sent');logger[_0x18a4('0xb')](_0x18a4('0xc'),_0x58eb3d,_0x18a4('0xd'),JSON['stringify'](_0x3efabf));if(_0x3efabf[_0x18a4('0xe')]){if(_0x3efabf[_0x18a4('0xe')][_0x18a4('0xf')]===0x1f4){logger[_0x18a4('0xe')]('Condition,\x20%s,\x20%s',_0x58eb3d,_0x3efabf[_0x18a4('0xe')][_0x18a4('0x10')]);return _0x335c14(_0x3efabf[_0x18a4('0xe')][_0x18a4('0x10')]);}logger['error'](_0x18a4('0x11'),_0x58eb3d,_0x3efabf[_0x18a4('0xe')][_0x18a4('0x10')]);return _0x2900ea(_0x3efabf[_0x18a4('0xe')][_0x18a4('0x10')]);}else{logger[_0x18a4('0xa')]('Condition,\x20%s,\x20%s',_0x58eb3d,_0x18a4('0xd'));_0x2900ea(_0x3efabf[_0x18a4('0x12')][_0x18a4('0x10')]);}})[_0x18a4('0x13')](function(_0xff6afe){logger[_0x18a4('0xe')](_0x18a4('0x11'),_0x58eb3d,_0xff6afe);_0x335c14(_0xff6afe);});});}
\ No newline at end of file