Built motion from commit 00bf23f6.|2.6.16
[motion2.git] / server / api / automation / automation.rpc.js
index b9b547a..f84ad72 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x153a=['Automation,\x20%s,\x20%s','message','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','then','info','request\x20sent','debug','Automation,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0xf175ff,_0x2ec742){var _0x34f944=function(_0x3e245a){while(--_0x3e245a){_0xf175ff['push'](_0xf175ff['shift']());}};_0x34f944(++_0x2ec742);}(_0x153a,0x172));var _0xa153=function(_0x2b9b7f,_0x4d47df){_0x2b9b7f=_0x2b9b7f-0x0;var _0x4ed19a=_0x153a[_0x2b9b7f];return _0x4ed19a;};'use strict';var _=require(_0xa153('0x0'));var util=require(_0xa153('0x1'));var moment=require(_0xa153('0x2'));var BPromise=require(_0xa153('0x3'));var rs=require(_0xa153('0x4'));var fs=require('fs');var Redis=require(_0xa153('0x5'));var db=require(_0xa153('0x6'))['db'];var utils=require(_0xa153('0x7'));var logger=require(_0xa153('0x8'))(_0xa153('0x9'));var config=require(_0xa153('0xa'));var jayson=require(_0xa153('0xb'));var client=jayson['client'][_0xa153('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x3ca177,_0x36c970,_0x11457a){return new BPromise(function(_0x5b2676,_0x5423f7){return client['request'](_0x3ca177,_0x11457a)[_0xa153('0xd')](function(_0x3e7328){logger[_0xa153('0xe')]('Automation,\x20%s,\x20%s',_0x36c970,_0xa153('0xf'));logger[_0xa153('0x10')](_0xa153('0x11'),_0x36c970,_0xa153('0xf'),JSON[_0xa153('0x12')](_0x3e7328));if(_0x3e7328[_0xa153('0x13')]){if(_0x3e7328[_0xa153('0x13')][_0xa153('0x14')]===0x1f4){logger['error'](_0xa153('0x15'),_0x36c970,_0x3e7328[_0xa153('0x13')][_0xa153('0x16')]);return _0x5423f7(_0x3e7328[_0xa153('0x13')][_0xa153('0x16')]);}logger[_0xa153('0x13')]('Automation,\x20%s,\x20%s',_0x36c970,_0x3e7328['error'][_0xa153('0x16')]);return _0x5b2676(_0x3e7328[_0xa153('0x13')][_0xa153('0x16')]);}else{logger[_0xa153('0xe')](_0xa153('0x15'),_0x36c970,_0xa153('0xf'));_0x5b2676(_0x3e7328['result'][_0xa153('0x16')]);}})['catch'](function(_0x13e807){logger[_0xa153('0x13')](_0xa153('0x15'),_0x36c970,_0x13e807);_0x5423f7(_0x13e807);});});}
\ No newline at end of file
+var _0x7524=['../../config/logger','../../config/environment','jayson/promise','client','http','then','info','Automation,\x20%s,\x20%s','debug','Automation,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','util','moment','randomstring','ioredis'];(function(_0x4cadfd,_0x889708){var _0x4985f6=function(_0x518760){while(--_0x518760){_0x4cadfd['push'](_0x4cadfd['shift']());}};_0x4985f6(++_0x889708);}(_0x7524,0xce));var _0x4752=function(_0x1a5770,_0x5d5983){_0x1a5770=_0x1a5770-0x0;var _0x59ccdf=_0x7524[_0x1a5770];return _0x59ccdf;};'use strict';var _=require('lodash');var util=require(_0x4752('0x0'));var moment=require(_0x4752('0x1'));var BPromise=require('bluebird');var rs=require(_0x4752('0x2'));var fs=require('fs');var Redis=require(_0x4752('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x4752('0x4'))('rpc');var config=require(_0x4752('0x5'));var jayson=require(_0x4752('0x6'));var client=jayson[_0x4752('0x7')][_0x4752('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x104962,_0x5b98c0,_0x1e76cf){return new BPromise(function(_0x1cbf34,_0x59477c){return client['request'](_0x104962,_0x1e76cf)[_0x4752('0x9')](function(_0x45e0ff){logger[_0x4752('0xa')](_0x4752('0xb'),_0x5b98c0,'request\x20sent');logger[_0x4752('0xc')](_0x4752('0xd'),_0x5b98c0,_0x4752('0xe'),JSON[_0x4752('0xf')](_0x45e0ff));if(_0x45e0ff[_0x4752('0x10')]){if(_0x45e0ff['error'][_0x4752('0x11')]===0x1f4){logger[_0x4752('0x10')](_0x4752('0xb'),_0x5b98c0,_0x45e0ff[_0x4752('0x10')][_0x4752('0x12')]);return _0x59477c(_0x45e0ff[_0x4752('0x10')][_0x4752('0x12')]);}logger['error'](_0x4752('0xb'),_0x5b98c0,_0x45e0ff['error'][_0x4752('0x12')]);return _0x1cbf34(_0x45e0ff[_0x4752('0x10')][_0x4752('0x12')]);}else{logger[_0x4752('0xa')](_0x4752('0xb'),_0x5b98c0,_0x4752('0xe'));_0x1cbf34(_0x45e0ff[_0x4752('0x13')]['message']);}})[_0x4752('0x14')](function(_0x1dad7c){logger['error'](_0x4752('0xb'),_0x5b98c0,_0x1dad7c);_0x59477c(_0x1dad7c);});});}
\ No newline at end of file