Built motion from commit efa66e19.|2.6.22
[motion2.git] / server / api / schedule / schedule.rpc.js
index 258b7df..4e50067 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdbf5=['moment','bluebird','randomstring','../../mysqldb','rpc','../../config/environment','client','http','request','then','info','Schedule,\x20%s,\x20%s','request\x20sent','debug','Schedule,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','util'];(function(_0x13af8c,_0x249987){var _0x45ed34=function(_0x20e434){while(--_0x20e434){_0x13af8c['push'](_0x13af8c['shift']());}};_0x45ed34(++_0x249987);}(_0xdbf5,0xf1));var _0x5dbf=function(_0x3846d9,_0x191e45){_0x3846d9=_0x3846d9-0x0;var _0x54d986=_0xdbf5[_0x3846d9];return _0x54d986;};'use strict';var _=require('lodash');var util=require(_0x5dbf('0x0'));var moment=require(_0x5dbf('0x1'));var BPromise=require(_0x5dbf('0x2'));var rs=require(_0x5dbf('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x5dbf('0x4'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x5dbf('0x5'));var config=require(_0x5dbf('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x5dbf('0x7')][_0x5dbf('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x4f6c30,_0x2c49d6,_0x3dbe7c){return new BPromise(function(_0x154094,_0x13ef3b){return client[_0x5dbf('0x9')](_0x4f6c30,_0x3dbe7c)[_0x5dbf('0xa')](function(_0x1623b9){logger[_0x5dbf('0xb')](_0x5dbf('0xc'),_0x2c49d6,_0x5dbf('0xd'));logger[_0x5dbf('0xe')](_0x5dbf('0xf'),_0x2c49d6,_0x5dbf('0xd'),JSON[_0x5dbf('0x10')](_0x1623b9));if(_0x1623b9[_0x5dbf('0x11')]){if(_0x1623b9['error'][_0x5dbf('0x12')]===0x1f4){logger[_0x5dbf('0x11')](_0x5dbf('0xc'),_0x2c49d6,_0x1623b9['error'][_0x5dbf('0x13')]);return _0x13ef3b(_0x1623b9[_0x5dbf('0x11')][_0x5dbf('0x13')]);}logger[_0x5dbf('0x11')](_0x5dbf('0xc'),_0x2c49d6,_0x1623b9['error']['message']);return _0x154094(_0x1623b9[_0x5dbf('0x11')][_0x5dbf('0x13')]);}else{logger['info'](_0x5dbf('0xc'),_0x2c49d6,'request\x20sent');_0x154094(_0x1623b9[_0x5dbf('0x14')][_0x5dbf('0x13')]);}})[_0x5dbf('0x15')](function(_0xc7c5ff){logger[_0x5dbf('0x11')](_0x5dbf('0xc'),_0x2c49d6,_0xc7c5ff);_0x13ef3b(_0xc7c5ff);});});}
\ No newline at end of file
+var _0xe8f5=['request','then','info','debug','Schedule,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','Schedule,\x20%s,\x20%s','message','result','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http'];(function(_0x207b53,_0x71b115){var _0x3d8932=function(_0x5d97d4){while(--_0x5d97d4){_0x207b53['push'](_0x207b53['shift']());}};_0x3d8932(++_0x71b115);}(_0xe8f5,0x144));var _0x5e8f=function(_0x344b42,_0x16740b){_0x344b42=_0x344b42-0x0;var _0x1a4d40=_0xe8f5[_0x344b42];return _0x1a4d40;};'use strict';var _=require(_0x5e8f('0x0'));var util=require(_0x5e8f('0x1'));var moment=require(_0x5e8f('0x2'));var BPromise=require(_0x5e8f('0x3'));var rs=require(_0x5e8f('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x5e8f('0x5'))['db'];var utils=require(_0x5e8f('0x6'));var logger=require('../../config/logger')(_0x5e8f('0x7'));var config=require(_0x5e8f('0x8'));var jayson=require(_0x5e8f('0x9'));var client=jayson[_0x5e8f('0xa')][_0x5e8f('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x245537,_0x4db9fb,_0x33e182){return new BPromise(function(_0x29c8ee,_0x18fb58){return client[_0x5e8f('0xc')](_0x245537,_0x33e182)[_0x5e8f('0xd')](function(_0x57b27b){logger[_0x5e8f('0xe')]('Schedule,\x20%s,\x20%s',_0x4db9fb,'request\x20sent');logger[_0x5e8f('0xf')](_0x5e8f('0x10'),_0x4db9fb,_0x5e8f('0x11'),JSON[_0x5e8f('0x12')](_0x57b27b));if(_0x57b27b['error']){if(_0x57b27b['error']['code']===0x1f4){logger[_0x5e8f('0x13')](_0x5e8f('0x14'),_0x4db9fb,_0x57b27b[_0x5e8f('0x13')]['message']);return _0x18fb58(_0x57b27b['error']['message']);}logger[_0x5e8f('0x13')]('Schedule,\x20%s,\x20%s',_0x4db9fb,_0x57b27b[_0x5e8f('0x13')][_0x5e8f('0x15')]);return _0x29c8ee(_0x57b27b[_0x5e8f('0x13')]['message']);}else{logger[_0x5e8f('0xe')](_0x5e8f('0x14'),_0x4db9fb,_0x5e8f('0x11'));_0x29c8ee(_0x57b27b[_0x5e8f('0x16')]['message']);}})[_0x5e8f('0x17')](function(_0x7d5a6e){logger[_0x5e8f('0x13')]('Schedule,\x20%s,\x20%s',_0x4db9fb,_0x7d5a6e);_0x18fb58(_0x7d5a6e);});});}
\ No newline at end of file