Built motion from commit ffdca78c.|2.6.24
[motion2.git] / server / api / schedule / schedule.rpc.js
index 29599b4..08b1b59 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbe69=['client','request','then','info','request\x20sent','debug','Schedule,\x20%s,\x20%s,\x20%s','stringify','error','code','Schedule,\x20%s,\x20%s','message','result','catch','lodash','util','moment','bluebird','../../mysqldb','rpc','jayson/promise'];(function(_0x2ac059,_0x39205b){var _0x302e26=function(_0x3a8284){while(--_0x3a8284){_0x2ac059['push'](_0x2ac059['shift']());}};_0x302e26(++_0x39205b);}(_0xbe69,0xf5));var _0x9be6=function(_0x5adefd,_0x4cf88a){_0x5adefd=_0x5adefd-0x0;var _0x88d75c=_0xbe69[_0x5adefd];return _0x88d75c;};'use strict';var _=require(_0x9be6('0x0'));var util=require(_0x9be6('0x1'));var moment=require(_0x9be6('0x2'));var BPromise=require(_0x9be6('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x9be6('0x4'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x9be6('0x5'));var config=require('../../config/environment');var jayson=require(_0x9be6('0x6'));var client=jayson[_0x9be6('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x2e88ae,_0x15f9af,_0x53f897){return new BPromise(function(_0x51ff0b,_0x512af7){return client[_0x9be6('0x8')](_0x2e88ae,_0x53f897)[_0x9be6('0x9')](function(_0x2687f1){logger[_0x9be6('0xa')]('Schedule,\x20%s,\x20%s',_0x15f9af,_0x9be6('0xb'));logger[_0x9be6('0xc')](_0x9be6('0xd'),_0x15f9af,'request\x20sent',JSON[_0x9be6('0xe')](_0x2687f1));if(_0x2687f1[_0x9be6('0xf')]){if(_0x2687f1[_0x9be6('0xf')][_0x9be6('0x10')]===0x1f4){logger[_0x9be6('0xf')](_0x9be6('0x11'),_0x15f9af,_0x2687f1[_0x9be6('0xf')][_0x9be6('0x12')]);return _0x512af7(_0x2687f1[_0x9be6('0xf')][_0x9be6('0x12')]);}logger[_0x9be6('0xf')](_0x9be6('0x11'),_0x15f9af,_0x2687f1[_0x9be6('0xf')][_0x9be6('0x12')]);return _0x51ff0b(_0x2687f1[_0x9be6('0xf')][_0x9be6('0x12')]);}else{logger[_0x9be6('0xa')](_0x9be6('0x11'),_0x15f9af,_0x9be6('0xb'));_0x51ff0b(_0x2687f1[_0x9be6('0x13')][_0x9be6('0x12')]);}})[_0x9be6('0x14')](function(_0x1520a7){logger[_0x9be6('0xf')](_0x9be6('0x11'),_0x15f9af,_0x1520a7);_0x512af7(_0x1520a7);});});}
\ No newline at end of file
+var _0x89bf=['message','request\x20sent','catch','util','moment','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','Schedule,\x20%s,\x20%s','stringify','error','code'];(function(_0x1174fb,_0x3976ad){var _0x34ee78=function(_0x231fd7){while(--_0x231fd7){_0x1174fb['push'](_0x1174fb['shift']());}};_0x34ee78(++_0x3976ad);}(_0x89bf,0xdf));var _0xf89b=function(_0x33b981,_0x5e2aa5){_0x33b981=_0x33b981-0x0;var _0x36a1ac=_0x89bf[_0x33b981];return _0x36a1ac;};'use strict';var _=require('lodash');var util=require(_0xf89b('0x0'));var moment=require(_0xf89b('0x1'));var BPromise=require('bluebird');var rs=require(_0xf89b('0x2'));var fs=require('fs');var Redis=require(_0xf89b('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0xf89b('0x4'));var logger=require(_0xf89b('0x5'))('rpc');var config=require(_0xf89b('0x6'));var jayson=require(_0xf89b('0x7'));var client=jayson[_0xf89b('0x8')][_0xf89b('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x46e7ac,_0x33145a,_0x388a11){return new BPromise(function(_0x455d01,_0x632470){return client[_0xf89b('0xa')](_0x46e7ac,_0x388a11)[_0xf89b('0xb')](function(_0xdffc79){logger[_0xf89b('0xc')](_0xf89b('0xd'),_0x33145a,'request\x20sent');logger['debug']('Schedule,\x20%s,\x20%s,\x20%s',_0x33145a,'request\x20sent',JSON[_0xf89b('0xe')](_0xdffc79));if(_0xdffc79[_0xf89b('0xf')]){if(_0xdffc79[_0xf89b('0xf')][_0xf89b('0x10')]===0x1f4){logger[_0xf89b('0xf')](_0xf89b('0xd'),_0x33145a,_0xdffc79[_0xf89b('0xf')][_0xf89b('0x11')]);return _0x632470(_0xdffc79[_0xf89b('0xf')][_0xf89b('0x11')]);}logger[_0xf89b('0xf')](_0xf89b('0xd'),_0x33145a,_0xdffc79[_0xf89b('0xf')][_0xf89b('0x11')]);return _0x455d01(_0xdffc79[_0xf89b('0xf')]['message']);}else{logger['info'](_0xf89b('0xd'),_0x33145a,_0xf89b('0x12'));_0x455d01(_0xdffc79['result'][_0xf89b('0x11')]);}})[_0xf89b('0x13')](function(_0x5783c9){logger[_0xf89b('0xf')](_0xf89b('0xd'),_0x33145a,_0x5783c9);_0x632470(_0x5783c9);});});}
\ No newline at end of file