Built motion from commit 85328c08.|2.5.50
[motion2.git] / server / api / schedule / schedule.rpc.js
index 75a07ac..ad3ccf0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5589=['request','then','Schedule,\x20%s,\x20%s','request\x20sent','debug','Schedule,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http'];(function(_0x5ea3f3,_0x50df8a){var _0x51a0cd=function(_0x2a6a20){while(--_0x2a6a20){_0x5ea3f3['push'](_0x5ea3f3['shift']());}};_0x51a0cd(++_0x50df8a);}(_0x5589,0xfb));var _0x9558=function(_0x422905,_0x3bce3a){_0x422905=_0x422905-0x0;var _0x33dc6c=_0x5589[_0x422905];return _0x33dc6c;};'use strict';var _=require(_0x9558('0x0'));var util=require(_0x9558('0x1'));var moment=require(_0x9558('0x2'));var BPromise=require('bluebird');var rs=require(_0x9558('0x3'));var fs=require('fs');var Redis=require(_0x9558('0x4'));var db=require(_0x9558('0x5'))['db'];var utils=require(_0x9558('0x6'));var logger=require(_0x9558('0x7'))(_0x9558('0x8'));var config=require(_0x9558('0x9'));var jayson=require(_0x9558('0xa'));var client=jayson[_0x9558('0xb')][_0x9558('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x9b9c5e,_0x5522e1,_0x41db1e){return new BPromise(function(_0x252952,_0x477967){return client[_0x9558('0xd')](_0x9b9c5e,_0x41db1e)[_0x9558('0xe')](function(_0x1ab459){logger['info'](_0x9558('0xf'),_0x5522e1,_0x9558('0x10'));logger[_0x9558('0x11')](_0x9558('0x12'),_0x5522e1,_0x9558('0x10'),JSON[_0x9558('0x13')](_0x1ab459));if(_0x1ab459[_0x9558('0x14')]){if(_0x1ab459[_0x9558('0x14')]['code']===0x1f4){logger['error'](_0x9558('0xf'),_0x5522e1,_0x1ab459['error'][_0x9558('0x15')]);return _0x477967(_0x1ab459[_0x9558('0x14')][_0x9558('0x15')]);}logger[_0x9558('0x14')]('Schedule,\x20%s,\x20%s',_0x5522e1,_0x1ab459[_0x9558('0x14')][_0x9558('0x15')]);return _0x252952(_0x1ab459[_0x9558('0x14')][_0x9558('0x15')]);}else{logger['info'](_0x9558('0xf'),_0x5522e1,_0x9558('0x10'));_0x252952(_0x1ab459[_0x9558('0x16')][_0x9558('0x15')]);}})[_0x9558('0x17')](function(_0x6c5711){logger[_0x9558('0x14')](_0x9558('0xf'),_0x5522e1,_0x6c5711);_0x477967(_0x6c5711);});});}
\ No newline at end of file
+var _0x5299=['catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','request','info','Schedule,\x20%s,\x20%s','request\x20sent','debug','Schedule,\x20%s,\x20%s,\x20%s','stringify','error','code','message'];(function(_0x5447fd,_0x52a6b5){var _0x15b28a=function(_0x370d4f){while(--_0x370d4f){_0x5447fd['push'](_0x5447fd['shift']());}};_0x15b28a(++_0x52a6b5);}(_0x5299,0x13c));var _0x9529=function(_0x33d755,_0x1411ad){_0x33d755=_0x33d755-0x0;var _0x1307a6=_0x5299[_0x33d755];return _0x1307a6;};'use strict';var _=require(_0x9529('0x0'));var util=require('util');var moment=require(_0x9529('0x1'));var BPromise=require(_0x9529('0x2'));var rs=require(_0x9529('0x3'));var fs=require('fs');var Redis=require(_0x9529('0x4'));var db=require(_0x9529('0x5'))['db'];var utils=require(_0x9529('0x6'));var logger=require('../../config/logger')(_0x9529('0x7'));var config=require(_0x9529('0x8'));var jayson=require(_0x9529('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x5cecbc,_0x628f40,_0x4b0b75){return new BPromise(function(_0x45bef5,_0x2868b7){return client[_0x9529('0xa')](_0x5cecbc,_0x4b0b75)['then'](function(_0x28af04){logger[_0x9529('0xb')](_0x9529('0xc'),_0x628f40,_0x9529('0xd'));logger[_0x9529('0xe')](_0x9529('0xf'),_0x628f40,'request\x20sent',JSON[_0x9529('0x10')](_0x28af04));if(_0x28af04[_0x9529('0x11')]){if(_0x28af04['error'][_0x9529('0x12')]===0x1f4){logger[_0x9529('0x11')]('Schedule,\x20%s,\x20%s',_0x628f40,_0x28af04['error'][_0x9529('0x13')]);return _0x2868b7(_0x28af04[_0x9529('0x11')][_0x9529('0x13')]);}logger['error'](_0x9529('0xc'),_0x628f40,_0x28af04[_0x9529('0x11')]['message']);return _0x45bef5(_0x28af04[_0x9529('0x11')]['message']);}else{logger[_0x9529('0xb')](_0x9529('0xc'),_0x628f40,'request\x20sent');_0x45bef5(_0x28af04['result']['message']);}})[_0x9529('0x14')](function(_0x15fa50){logger[_0x9529('0x11')](_0x9529('0xc'),_0x628f40,_0x15fa50);_0x2868b7(_0x15fa50);});});}
\ No newline at end of file