Built motion from commit 47436d59.|2.6.7
[motion2.git] / server / api / schedule / schedule.rpc.js
index bbabd7e..14a087e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x18b8=['../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info','Schedule,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb'];(function(_0xce698d,_0x829cad){var _0x1701d5=function(_0x2c48b8){while(--_0x2c48b8){_0xce698d['push'](_0xce698d['shift']());}};_0x1701d5(++_0x829cad);}(_0x18b8,0x9b));var _0x818b=function(_0x3bd307,_0x41784e){_0x3bd307=_0x3bd307-0x0;var _0x70449a=_0x18b8[_0x3bd307];return _0x70449a;};'use strict';var _=require(_0x818b('0x0'));var util=require(_0x818b('0x1'));var moment=require(_0x818b('0x2'));var BPromise=require(_0x818b('0x3'));var rs=require(_0x818b('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x818b('0x5'))['db'];var utils=require(_0x818b('0x6'));var logger=require(_0x818b('0x7'))(_0x818b('0x8'));var config=require('../../config/environment');var jayson=require(_0x818b('0x9'));var client=jayson[_0x818b('0xa')][_0x818b('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x31c031,_0x5cf5b8,_0x37fca0){return new BPromise(function(_0x25d01b,_0x56a473){return client[_0x818b('0xc')](_0x31c031,_0x37fca0)[_0x818b('0xd')](function(_0x3854a1){logger[_0x818b('0xe')](_0x818b('0xf'),_0x5cf5b8,'request\x20sent');logger[_0x818b('0x10')]('Schedule,\x20%s,\x20%s,\x20%s',_0x5cf5b8,_0x818b('0x11'),JSON[_0x818b('0x12')](_0x3854a1));if(_0x3854a1[_0x818b('0x13')]){if(_0x3854a1[_0x818b('0x13')][_0x818b('0x14')]===0x1f4){logger[_0x818b('0x13')](_0x818b('0xf'),_0x5cf5b8,_0x3854a1[_0x818b('0x13')]['message']);return _0x56a473(_0x3854a1[_0x818b('0x13')][_0x818b('0x15')]);}logger[_0x818b('0x13')](_0x818b('0xf'),_0x5cf5b8,_0x3854a1['error'][_0x818b('0x15')]);return _0x25d01b(_0x3854a1['error'][_0x818b('0x15')]);}else{logger[_0x818b('0xe')](_0x818b('0xf'),_0x5cf5b8,_0x818b('0x11'));_0x25d01b(_0x3854a1['result'][_0x818b('0x15')]);}})[_0x818b('0x16')](function(_0x3bc4c8){logger[_0x818b('0x13')]('Schedule,\x20%s,\x20%s',_0x5cf5b8,_0x3bc4c8);_0x56a473(_0x3bc4c8);});});}
\ 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