Built motion from commit (unavailable).|2.5.14
[motion2.git] / server / api / pause / pause.rpc.js
index 790e7bd..44adfb4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4567=['../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','info','request\x20sent','error','code','Pause,\x20%s,\x20%s','message','result','catch','Pause','find','options','raw','where','include','map','model','attributes','debug','ShowPause','stringify','lodash','util','moment','randomstring','ioredis','../../mysqldb'];(function(_0x4a9fb1,_0x273043){var _0x348672=function(_0x142b69){while(--_0x142b69){_0x4a9fb1['push'](_0x4a9fb1['shift']());}};_0x348672(++_0x273043);}(_0x4567,0x14e));var _0x7456=function(_0x551fd2,_0x39c449){_0x551fd2=_0x551fd2-0x0;var _0xd75687=_0x4567[_0x551fd2];return _0xd75687;};'use strict';var _=require(_0x7456('0x0'));var util=require(_0x7456('0x1'));var moment=require(_0x7456('0x2'));var BPromise=require('bluebird');var rs=require(_0x7456('0x3'));var fs=require('fs');var Redis=require(_0x7456('0x4'));var db=require(_0x7456('0x5'))['db'];var utils=require(_0x7456('0x6'));var logger=require(_0x7456('0x7'))(_0x7456('0x8'));var config=require(_0x7456('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x7456('0xa')][_0x7456('0xb')]({'port':0x232a});function respondWithRpcPromise(_0xa5bad9,_0x489690,_0x417d1c){return new BPromise(function(_0x4cfc2b,_0x15a2c5){return client[_0x7456('0xc')](_0xa5bad9,_0x417d1c)[_0x7456('0xd')](function(_0x29a68c){logger[_0x7456('0xe')]('Pause,\x20%s,\x20%s',_0x489690,_0x7456('0xf'));logger['debug']('Pause,\x20%s,\x20%s,\x20%s',_0x489690,'request\x20sent',JSON['stringify'](_0x29a68c));if(_0x29a68c[_0x7456('0x10')]){if(_0x29a68c[_0x7456('0x10')][_0x7456('0x11')]===0x1f4){logger['error'](_0x7456('0x12'),_0x489690,_0x29a68c['error'][_0x7456('0x13')]);return _0x15a2c5(_0x29a68c[_0x7456('0x10')][_0x7456('0x13')]);}logger[_0x7456('0x10')](_0x7456('0x12'),_0x489690,_0x29a68c[_0x7456('0x10')]['message']);return _0x4cfc2b(_0x29a68c[_0x7456('0x10')]['message']);}else{logger['info']('Pause,\x20%s,\x20%s',_0x489690,'request\x20sent');_0x4cfc2b(_0x29a68c[_0x7456('0x14')][_0x7456('0x13')]);}})[_0x7456('0x15')](function(_0x3d66ed){logger['error']('Pause,\x20%s,\x20%s',_0x489690,_0x3d66ed);_0x15a2c5(_0x3d66ed);});});}exports['ShowPause']=function(_0x2015ef){var _0x2d5d68=this;return new Promise(function(_0x468115,_0x2379b0){return db[_0x7456('0x16')][_0x7456('0x17')]({'raw':_0x2015ef[_0x7456('0x18')]?_0x2015ef[_0x7456('0x18')][_0x7456('0x19')]===undefined?!![]:![]:!![],'where':_0x2015ef['options']?_0x2015ef[_0x7456('0x18')][_0x7456('0x1a')]||null:null,'attributes':_0x2015ef[_0x7456('0x18')]?_0x2015ef[_0x7456('0x18')]['attributes']||null:null,'include':_0x2015ef[_0x7456('0x18')]?_0x2015ef[_0x7456('0x18')][_0x7456('0x1b')]?_[_0x7456('0x1c')](_0x2015ef[_0x7456('0x18')][_0x7456('0x1b')],function(_0x54ed25){return{'model':db[_0x54ed25[_0x7456('0x1d')]],'as':_0x54ed25['as'],'attributes':_0x54ed25[_0x7456('0x1e')],'include':_0x54ed25[_0x7456('0x1b')]?_[_0x7456('0x1c')](_0x54ed25[_0x7456('0x1b')],function(_0x43373d){return{'model':db[_0x43373d[_0x7456('0x1d')]],'as':_0x43373d['as'],'attributes':_0x43373d[_0x7456('0x1e')],'include':_0x43373d[_0x7456('0x1b')]?_[_0x7456('0x1c')](_0x43373d[_0x7456('0x1b')],function(_0x3e328f){return{'model':db[_0x3e328f[_0x7456('0x1d')]],'as':_0x3e328f['as'],'attributes':_0x3e328f['attributes']};}):[]};}):[]};}):[]:[]})[_0x7456('0xd')](function(_0x590ee0){logger[_0x7456('0xe')]('ShowPause',_0x2015ef);logger[_0x7456('0x1f')](_0x7456('0x20'),_0x2015ef,JSON[_0x7456('0x21')](_0x590ee0));_0x468115(_0x590ee0);})[_0x7456('0x15')](function(_0x2951a9){logger[_0x7456('0x10')](_0x7456('0x20'),_0x2951a9['message'],_0x2015ef);_0x2379b0(_0x2d5d68[_0x7456('0x10')](0x1f4,_0x2951a9[_0x7456('0x13')]));});});};
\ No newline at end of file
+var _0x03a6=['ShowPause','Pause','find','raw','options','where','attributes','include','map','model','stringify','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','rpc','../../config/environment','http','Pause,\x20%s,\x20%s','request\x20sent','debug','Pause,\x20%s,\x20%s,\x20%s','error','message','info','result','catch'];(function(_0x49b207,_0x408ade){var _0x2dc8fa=function(_0x150975){while(--_0x150975){_0x49b207['push'](_0x49b207['shift']());}};_0x2dc8fa(++_0x408ade);}(_0x03a6,0x1af));var _0x603a=function(_0x45c149,_0x138852){_0x45c149=_0x45c149-0x0;var _0x1c56c5=_0x03a6[_0x45c149];return _0x1c56c5;};'use strict';var _=require(_0x603a('0x0'));var util=require(_0x603a('0x1'));var moment=require(_0x603a('0x2'));var BPromise=require(_0x603a('0x3'));var rs=require(_0x603a('0x4'));var fs=require('fs');var Redis=require(_0x603a('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x603a('0x6'));var logger=require('../../config/logger')(_0x603a('0x7'));var config=require(_0x603a('0x8'));var jayson=require('jayson/promise');var client=jayson['client'][_0x603a('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x32674e,_0x62500d,_0x19aacf){return new BPromise(function(_0x3fb550,_0x424287){return client['request'](_0x32674e,_0x19aacf)['then'](function(_0x2ff00b){logger['info'](_0x603a('0xa'),_0x62500d,_0x603a('0xb'));logger[_0x603a('0xc')](_0x603a('0xd'),_0x62500d,_0x603a('0xb'),JSON['stringify'](_0x2ff00b));if(_0x2ff00b[_0x603a('0xe')]){if(_0x2ff00b[_0x603a('0xe')]['code']===0x1f4){logger['error'](_0x603a('0xa'),_0x62500d,_0x2ff00b[_0x603a('0xe')][_0x603a('0xf')]);return _0x424287(_0x2ff00b['error'][_0x603a('0xf')]);}logger[_0x603a('0xe')](_0x603a('0xa'),_0x62500d,_0x2ff00b[_0x603a('0xe')][_0x603a('0xf')]);return _0x3fb550(_0x2ff00b['error'][_0x603a('0xf')]);}else{logger[_0x603a('0x10')]('Pause,\x20%s,\x20%s',_0x62500d,_0x603a('0xb'));_0x3fb550(_0x2ff00b[_0x603a('0x11')][_0x603a('0xf')]);}})[_0x603a('0x12')](function(_0x1fbf2c){logger[_0x603a('0xe')](_0x603a('0xa'),_0x62500d,_0x1fbf2c);_0x424287(_0x1fbf2c);});});}exports[_0x603a('0x13')]=function(_0x5e7460){var _0x1edd87=this;return new Promise(function(_0x23f700,_0x1cd8ec){return db[_0x603a('0x14')][_0x603a('0x15')]({'raw':_0x5e7460['options']?_0x5e7460['options'][_0x603a('0x16')]===undefined?!![]:![]:!![],'where':_0x5e7460[_0x603a('0x17')]?_0x5e7460[_0x603a('0x17')][_0x603a('0x18')]||null:null,'attributes':_0x5e7460[_0x603a('0x17')]?_0x5e7460['options'][_0x603a('0x19')]||null:null,'include':_0x5e7460['options']?_0x5e7460[_0x603a('0x17')][_0x603a('0x1a')]?_[_0x603a('0x1b')](_0x5e7460[_0x603a('0x17')][_0x603a('0x1a')],function(_0x298458){return{'model':db[_0x298458[_0x603a('0x1c')]],'as':_0x298458['as'],'attributes':_0x298458[_0x603a('0x19')],'include':_0x298458[_0x603a('0x1a')]?_[_0x603a('0x1b')](_0x298458[_0x603a('0x1a')],function(_0x483031){return{'model':db[_0x483031[_0x603a('0x1c')]],'as':_0x483031['as'],'attributes':_0x483031[_0x603a('0x19')],'include':_0x483031[_0x603a('0x1a')]?_[_0x603a('0x1b')](_0x483031[_0x603a('0x1a')],function(_0x5a2794){return{'model':db[_0x5a2794[_0x603a('0x1c')]],'as':_0x5a2794['as'],'attributes':_0x5a2794[_0x603a('0x19')]};}):[]};}):[]};}):[]:[]})['then'](function(_0xae563b){logger[_0x603a('0x10')](_0x603a('0x13'),_0x5e7460);logger[_0x603a('0xc')](_0x603a('0x13'),_0x5e7460,JSON[_0x603a('0x1d')](_0xae563b));_0x23f700(_0xae563b);})[_0x603a('0x12')](function(_0x40df62){logger[_0x603a('0xe')](_0x603a('0x13'),_0x40df62[_0x603a('0xf')],_0x5e7460);_0x1cd8ec(_0x1edd87[_0x603a('0xe')](0x1f4,_0x40df62[_0x603a('0xf')]));});});};
\ No newline at end of file