Built motion from commit 092f8824.|2.5.49
[motion2.git] / server / api / schedule / schedule.rpc.js
index f208497..af66c61 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbf1d=['http','then','info','Schedule,\x20%s,\x20%s','debug','request\x20sent','error','code','message','result','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x215fb5,_0x5711db){var _0x112cd8=function(_0x10cbef){while(--_0x10cbef){_0x215fb5['push'](_0x215fb5['shift']());}};_0x112cd8(++_0x5711db);}(_0xbf1d,0x186));var _0xdbf1=function(_0x394814,_0x4c25f4){_0x394814=_0x394814-0x0;var _0x15deb3=_0xbf1d[_0x394814];return _0x15deb3;};'use strict';var _=require('lodash');var util=require(_0xdbf1('0x0'));var moment=require('moment');var BPromise=require(_0xdbf1('0x1'));var rs=require(_0xdbf1('0x2'));var fs=require('fs');var Redis=require(_0xdbf1('0x3'));var db=require(_0xdbf1('0x4'))['db'];var utils=require(_0xdbf1('0x5'));var logger=require(_0xdbf1('0x6'))(_0xdbf1('0x7'));var config=require(_0xdbf1('0x8'));var jayson=require(_0xdbf1('0x9'));var client=jayson['client'][_0xdbf1('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x5afdeb,_0x1bc7b0,_0x3c932b){return new BPromise(function(_0x5af776,_0x1dd7dd){return client['request'](_0x5afdeb,_0x3c932b)[_0xdbf1('0xb')](function(_0x2f8fea){logger[_0xdbf1('0xc')](_0xdbf1('0xd'),_0x1bc7b0,'request\x20sent');logger[_0xdbf1('0xe')]('Schedule,\x20%s,\x20%s,\x20%s',_0x1bc7b0,_0xdbf1('0xf'),JSON['stringify'](_0x2f8fea));if(_0x2f8fea['error']){if(_0x2f8fea[_0xdbf1('0x10')][_0xdbf1('0x11')]===0x1f4){logger[_0xdbf1('0x10')](_0xdbf1('0xd'),_0x1bc7b0,_0x2f8fea['error'][_0xdbf1('0x12')]);return _0x1dd7dd(_0x2f8fea['error'][_0xdbf1('0x12')]);}logger[_0xdbf1('0x10')](_0xdbf1('0xd'),_0x1bc7b0,_0x2f8fea['error'][_0xdbf1('0x12')]);return _0x5af776(_0x2f8fea[_0xdbf1('0x10')]['message']);}else{logger[_0xdbf1('0xc')](_0xdbf1('0xd'),_0x1bc7b0,_0xdbf1('0xf'));_0x5af776(_0x2f8fea[_0xdbf1('0x13')][_0xdbf1('0x12')]);}})['catch'](function(_0x312121){logger['error'](_0xdbf1('0xd'),_0x1bc7b0,_0x312121);_0x1dd7dd(_0x312121);});});}
\ No newline at end of file
+var _0x7bc4=['code','message','info','result','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','request','then','Schedule,\x20%s,\x20%s','debug','Schedule,\x20%s,\x20%s,\x20%s','request\x20sent','error'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x7bc4,0xbc));var _0x47bc=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x7bc4[_0x321bb2];return _0x9c12ed;};'use strict';var _=require(_0x47bc('0x0'));var util=require(_0x47bc('0x1'));var moment=require(_0x47bc('0x2'));var BPromise=require(_0x47bc('0x3'));var rs=require(_0x47bc('0x4'));var fs=require('fs');var Redis=require(_0x47bc('0x5'));var db=require(_0x47bc('0x6'))['db'];var utils=require(_0x47bc('0x7'));var logger=require(_0x47bc('0x8'))('rpc');var config=require(_0x47bc('0x9'));var jayson=require(_0x47bc('0xa'));var client=jayson[_0x47bc('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x45f16a,_0x390987,_0x12fe2a){return new BPromise(function(_0x21bff6,_0x608fb1){return client[_0x47bc('0xc')](_0x45f16a,_0x12fe2a)[_0x47bc('0xd')](function(_0x135cbd){logger['info'](_0x47bc('0xe'),_0x390987,'request\x20sent');logger[_0x47bc('0xf')](_0x47bc('0x10'),_0x390987,_0x47bc('0x11'),JSON['stringify'](_0x135cbd));if(_0x135cbd[_0x47bc('0x12')]){if(_0x135cbd['error'][_0x47bc('0x13')]===0x1f4){logger['error'](_0x47bc('0xe'),_0x390987,_0x135cbd[_0x47bc('0x12')][_0x47bc('0x14')]);return _0x608fb1(_0x135cbd[_0x47bc('0x12')][_0x47bc('0x14')]);}logger[_0x47bc('0x12')](_0x47bc('0xe'),_0x390987,_0x135cbd[_0x47bc('0x12')][_0x47bc('0x14')]);return _0x21bff6(_0x135cbd[_0x47bc('0x12')][_0x47bc('0x14')]);}else{logger[_0x47bc('0x15')](_0x47bc('0xe'),_0x390987,_0x47bc('0x11'));_0x21bff6(_0x135cbd[_0x47bc('0x16')][_0x47bc('0x14')]);}})['catch'](function(_0x5c2d73){logger[_0x47bc('0x12')](_0x47bc('0xe'),_0x390987,_0x5c2d73);_0x608fb1(_0x5c2d73);});});}
\ No newline at end of file