Built motion from commit 47436d59.|2.6.7
[motion2.git] / server / api / schedule / schedule.rpc.js
index a048e09..14a087e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x23df=['info','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','request\x20sent','debug','Schedule,\x20%s,\x20%s,\x20%s','stringify','error','message','Schedule,\x20%s,\x20%s'];(function(_0x56ab7e,_0x3d47af){var _0x4205b9=function(_0x362220){while(--_0x362220){_0x56ab7e['push'](_0x56ab7e['shift']());}};_0x4205b9(++_0x3d47af);}(_0x23df,0x148));var _0xf23d=function(_0x2db6e5,_0x228d98){_0x2db6e5=_0x2db6e5-0x0;var _0x29fe2d=_0x23df[_0x2db6e5];return _0x29fe2d;};'use strict';var _=require(_0xf23d('0x0'));var util=require(_0xf23d('0x1'));var moment=require(_0xf23d('0x2'));var BPromise=require(_0xf23d('0x3'));var rs=require(_0xf23d('0x4'));var fs=require('fs');var Redis=require(_0xf23d('0x5'));var db=require(_0xf23d('0x6'))['db'];var utils=require(_0xf23d('0x7'));var logger=require(_0xf23d('0x8'))(_0xf23d('0x9'));var config=require(_0xf23d('0xa'));var jayson=require(_0xf23d('0xb'));var client=jayson['client'][_0xf23d('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x31dc66,_0x24f438,_0x1ff648){return new BPromise(function(_0x419d71,_0x1d4acb){return client[_0xf23d('0xd')](_0x31dc66,_0x1ff648)[_0xf23d('0xe')](function(_0x5b7a4a){logger['info']('Schedule,\x20%s,\x20%s',_0x24f438,_0xf23d('0xf'));logger[_0xf23d('0x10')](_0xf23d('0x11'),_0x24f438,_0xf23d('0xf'),JSON[_0xf23d('0x12')](_0x5b7a4a));if(_0x5b7a4a[_0xf23d('0x13')]){if(_0x5b7a4a['error']['code']===0x1f4){logger[_0xf23d('0x13')]('Schedule,\x20%s,\x20%s',_0x24f438,_0x5b7a4a[_0xf23d('0x13')][_0xf23d('0x14')]);return _0x1d4acb(_0x5b7a4a['error']['message']);}logger[_0xf23d('0x13')](_0xf23d('0x15'),_0x24f438,_0x5b7a4a[_0xf23d('0x13')]['message']);return _0x419d71(_0x5b7a4a['error']['message']);}else{logger[_0xf23d('0x16')](_0xf23d('0x15'),_0x24f438,_0xf23d('0xf'));_0x419d71(_0x5b7a4a[_0xf23d('0x17')][_0xf23d('0x14')]);}})[_0xf23d('0x18')](function(_0x33d268){logger['error']('Schedule,\x20%s,\x20%s',_0x24f438,_0x33d268);_0x1d4acb(_0x33d268);});});}
\ No newline at end of file
+var _0x687a=['error','code','message','catch','lodash','util','moment','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','info','Schedule,\x20%s,\x20%s','request\x20sent'];(function(_0x4d7565,_0x1a40f3){var _0xeb52c3=function(_0xc33b7f){while(--_0xc33b7f){_0x4d7565['push'](_0x4d7565['shift']());}};_0xeb52c3(++_0x1a40f3);}(_0x687a,0x190));var _0xa687=function(_0x4b055c,_0x4b870b){_0x4b055c=_0x4b055c-0x0;var _0x4b62bb=_0x687a[_0x4b055c];return _0x4b62bb;};'use strict';var _=require(_0xa687('0x0'));var util=require(_0xa687('0x1'));var moment=require(_0xa687('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xa687('0x3'));var logger=require(_0xa687('0x4'))(_0xa687('0x5'));var config=require(_0xa687('0x6'));var jayson=require('jayson/promise');var client=jayson[_0xa687('0x7')][_0xa687('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x10af9d,_0x2cce56,_0x48a1a3){return new BPromise(function(_0x5af234,_0x5a8453){return client[_0xa687('0x9')](_0x10af9d,_0x48a1a3)[_0xa687('0xa')](function(_0x38e146){logger[_0xa687('0xb')](_0xa687('0xc'),_0x2cce56,_0xa687('0xd'));logger['debug']('Schedule,\x20%s,\x20%s,\x20%s',_0x2cce56,_0xa687('0xd'),JSON['stringify'](_0x38e146));if(_0x38e146[_0xa687('0xe')]){if(_0x38e146[_0xa687('0xe')][_0xa687('0xf')]===0x1f4){logger[_0xa687('0xe')](_0xa687('0xc'),_0x2cce56,_0x38e146[_0xa687('0xe')][_0xa687('0x10')]);return _0x5a8453(_0x38e146['error'][_0xa687('0x10')]);}logger[_0xa687('0xe')](_0xa687('0xc'),_0x2cce56,_0x38e146[_0xa687('0xe')][_0xa687('0x10')]);return _0x5af234(_0x38e146[_0xa687('0xe')][_0xa687('0x10')]);}else{logger[_0xa687('0xb')](_0xa687('0xc'),_0x2cce56,_0xa687('0xd'));_0x5af234(_0x38e146['result'][_0xa687('0x10')]);}})[_0xa687('0x11')](function(_0x447b45){logger['error'](_0xa687('0xc'),_0x2cce56,_0x447b45);_0x5a8453(_0x447b45);});});}
\ No newline at end of file