Built motion from commit d5e4af8c.|2.6.23
[motion2.git] / server / api / schedule / schedule.rpc.js
index a3f8fe2..f5d2def 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfc73=['message','catch','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','info','Schedule,\x20%s,\x20%s','request\x20sent','debug','Schedule,\x20%s,\x20%s,\x20%s','error'];(function(_0x3893ad,_0x3b3a57){var _0x411ac2=function(_0x2dcea6){while(--_0x2dcea6){_0x3893ad['push'](_0x3893ad['shift']());}};_0x411ac2(++_0x3b3a57);}(_0xfc73,0x145));var _0x3fc7=function(_0x4b7895,_0x3c4f5d){_0x4b7895=_0x4b7895-0x0;var _0x264180=_0xfc73[_0x4b7895];return _0x264180;};'use strict';var _=require('lodash');var util=require(_0x3fc7('0x0'));var moment=require('moment');var BPromise=require(_0x3fc7('0x1'));var rs=require(_0x3fc7('0x2'));var fs=require('fs');var Redis=require(_0x3fc7('0x3'));var db=require(_0x3fc7('0x4'))['db'];var utils=require(_0x3fc7('0x5'));var logger=require(_0x3fc7('0x6'))(_0x3fc7('0x7'));var config=require('../../config/environment');var jayson=require(_0x3fc7('0x8'));var client=jayson[_0x3fc7('0x9')][_0x3fc7('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x94ddb6,_0x55055f,_0x3a8690){return new BPromise(function(_0x912d96,_0x32f636){return client['request'](_0x94ddb6,_0x3a8690)['then'](function(_0x121a7d){logger[_0x3fc7('0xb')](_0x3fc7('0xc'),_0x55055f,_0x3fc7('0xd'));logger[_0x3fc7('0xe')](_0x3fc7('0xf'),_0x55055f,'request\x20sent',JSON['stringify'](_0x121a7d));if(_0x121a7d[_0x3fc7('0x10')]){if(_0x121a7d['error']['code']===0x1f4){logger[_0x3fc7('0x10')](_0x3fc7('0xc'),_0x55055f,_0x121a7d['error'][_0x3fc7('0x11')]);return _0x32f636(_0x121a7d['error'][_0x3fc7('0x11')]);}logger[_0x3fc7('0x10')](_0x3fc7('0xc'),_0x55055f,_0x121a7d[_0x3fc7('0x10')][_0x3fc7('0x11')]);return _0x912d96(_0x121a7d['error'][_0x3fc7('0x11')]);}else{logger[_0x3fc7('0xb')](_0x3fc7('0xc'),_0x55055f,'request\x20sent');_0x912d96(_0x121a7d['result'][_0x3fc7('0x11')]);}})[_0x3fc7('0x12')](function(_0x3e8d2a){logger[_0x3fc7('0x10')]('Schedule,\x20%s,\x20%s',_0x55055f,_0x3e8d2a);_0x32f636(_0x3e8d2a);});});}
\ No newline at end of file
+var _0x76f7=['Schedule,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','catch','lodash','util','moment','randomstring','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','client','http','then','Schedule,\x20%s,\x20%s','debug'];(function(_0x18de2e,_0x412972){var _0x197a79=function(_0x3cc580){while(--_0x3cc580){_0x18de2e['push'](_0x18de2e['shift']());}};_0x197a79(++_0x412972);}(_0x76f7,0x1e7));var _0x776f=function(_0x290c3b,_0x13cb2a){_0x290c3b=_0x290c3b-0x0;var _0x235c79=_0x76f7[_0x290c3b];return _0x235c79;};'use strict';var _=require(_0x776f('0x0'));var util=require(_0x776f('0x1'));var moment=require(_0x776f('0x2'));var BPromise=require('bluebird');var rs=require(_0x776f('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x776f('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x776f('0x5'))('rpc');var config=require(_0x776f('0x6'));var jayson=require(_0x776f('0x7'));var client=jayson[_0x776f('0x8')][_0x776f('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x430e79,_0x533b60,_0x394ca2){return new BPromise(function(_0x52c8e2,_0x49b90a){return client['request'](_0x430e79,_0x394ca2)[_0x776f('0xa')](function(_0x174faf){logger['info'](_0x776f('0xb'),_0x533b60,'request\x20sent');logger[_0x776f('0xc')](_0x776f('0xd'),_0x533b60,_0x776f('0xe'),JSON[_0x776f('0xf')](_0x174faf));if(_0x174faf[_0x776f('0x10')]){if(_0x174faf['error'][_0x776f('0x11')]===0x1f4){logger[_0x776f('0x10')](_0x776f('0xb'),_0x533b60,_0x174faf['error'][_0x776f('0x12')]);return _0x49b90a(_0x174faf[_0x776f('0x10')][_0x776f('0x12')]);}logger[_0x776f('0x10')](_0x776f('0xb'),_0x533b60,_0x174faf[_0x776f('0x10')][_0x776f('0x12')]);return _0x52c8e2(_0x174faf[_0x776f('0x10')][_0x776f('0x12')]);}else{logger['info'](_0x776f('0xb'),_0x533b60,'request\x20sent');_0x52c8e2(_0x174faf['result']['message']);}})[_0x776f('0x13')](function(_0x4a727e){logger[_0x776f('0x10')](_0x776f('0xb'),_0x533b60,_0x4a727e);_0x49b90a(_0x4a727e);});});}
\ No newline at end of file