Built motion from commit (unavailable).|2.4.14
[motion2.git] / server / api / variable / variable.rpc.js
index bf95314..2e4d5fe 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2895=['stringify','error','code','message','Variable,\x20%s,\x20%s','result','catch','ShowVariable','find','options','raw','where','include','attributes','map','model','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','http','then','info','debug','Variable,\x20%s,\x20%s,\x20%s','request\x20sent'];(function(_0x255d5b,_0x4f6f35){var _0x3e141a=function(_0x249ee2){while(--_0x249ee2){_0x255d5b['push'](_0x255d5b['shift']());}};_0x3e141a(++_0x4f6f35);}(_0x2895,0x70));var _0x5289=function(_0x21027e,_0x46a44d){_0x21027e=_0x21027e-0x0;var _0x4c18c5=_0x2895[_0x21027e];return _0x4c18c5;};'use strict';var _=require(_0x5289('0x0'));var util=require(_0x5289('0x1'));var moment=require(_0x5289('0x2'));var BPromise=require(_0x5289('0x3'));var rs=require(_0x5289('0x4'));var fs=require('fs');var Redis=require(_0x5289('0x5'));var db=require(_0x5289('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x5289('0x7'))('rpc');var config=require(_0x5289('0x8'));var jayson=require(_0x5289('0x9'));var client=jayson['client'][_0x5289('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2eb13b,_0x5be94d,_0x37383b){return new BPromise(function(_0xdcc180,_0x17906a){return client['request'](_0x2eb13b,_0x37383b)[_0x5289('0xb')](function(_0x341afd){logger[_0x5289('0xc')]('Variable,\x20%s,\x20%s',_0x5be94d,'request\x20sent');logger[_0x5289('0xd')](_0x5289('0xe'),_0x5be94d,_0x5289('0xf'),JSON[_0x5289('0x10')](_0x341afd));if(_0x341afd['error']){if(_0x341afd[_0x5289('0x11')][_0x5289('0x12')]===0x1f4){logger[_0x5289('0x11')]('Variable,\x20%s,\x20%s',_0x5be94d,_0x341afd[_0x5289('0x11')][_0x5289('0x13')]);return _0x17906a(_0x341afd[_0x5289('0x11')][_0x5289('0x13')]);}logger['error'](_0x5289('0x14'),_0x5be94d,_0x341afd[_0x5289('0x11')][_0x5289('0x13')]);return _0xdcc180(_0x341afd[_0x5289('0x11')]['message']);}else{logger[_0x5289('0xc')](_0x5289('0x14'),_0x5be94d,'request\x20sent');_0xdcc180(_0x341afd[_0x5289('0x15')][_0x5289('0x13')]);}})[_0x5289('0x16')](function(_0x5f4d35){logger[_0x5289('0x11')](_0x5289('0x14'),_0x5be94d,_0x5f4d35);_0x17906a(_0x5f4d35);});});}exports[_0x5289('0x17')]=function(_0x3e634b){var _0x4ca178=this;return new Promise(function(_0x4a4c8f,_0x535962){return db['Variable'][_0x5289('0x18')]({'raw':_0x3e634b[_0x5289('0x19')]?_0x3e634b[_0x5289('0x19')][_0x5289('0x1a')]===undefined?!![]:![]:!![],'where':_0x3e634b['options']?_0x3e634b['options'][_0x5289('0x1b')]||null:null,'attributes':_0x3e634b[_0x5289('0x19')]?_0x3e634b['options']['attributes']||null:null,'include':_0x3e634b[_0x5289('0x19')]?_0x3e634b[_0x5289('0x19')][_0x5289('0x1c')]?_['map'](_0x3e634b[_0x5289('0x19')]['include'],function(_0x24d5f1){return{'model':db[_0x24d5f1['model']],'as':_0x24d5f1['as'],'attributes':_0x24d5f1[_0x5289('0x1d')],'include':_0x24d5f1['include']?_[_0x5289('0x1e')](_0x24d5f1[_0x5289('0x1c')],function(_0x6a8f70){return{'model':db[_0x6a8f70[_0x5289('0x1f')]],'as':_0x6a8f70['as'],'attributes':_0x6a8f70[_0x5289('0x1d')],'include':_0x6a8f70[_0x5289('0x1c')]?_[_0x5289('0x1e')](_0x6a8f70[_0x5289('0x1c')],function(_0x463519){return{'model':db[_0x463519[_0x5289('0x1f')]],'as':_0x463519['as'],'attributes':_0x463519[_0x5289('0x1d')]};}):[]};}):[]};}):[]:[]})[_0x5289('0xb')](function(_0x599f19){logger['info'](_0x5289('0x17'),_0x3e634b);logger[_0x5289('0xd')](_0x5289('0x17'),_0x3e634b,JSON[_0x5289('0x10')](_0x599f19));_0x4a4c8f(_0x599f19);})['catch'](function(_0x325006){logger['error'](_0x5289('0x17'),_0x325006['message'],_0x3e634b);_0x535962(_0x4ca178[_0x5289('0x11')](0x1f4,_0x325006[_0x5289('0x13')]));});});};
\ No newline at end of file
+var _0x0072=['../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','info','Variable,\x20%s,\x20%s','request\x20sent','debug','Variable,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','ShowVariable','Variable','find','options','raw','where','attributes','include','model','map','then','moment','bluebird','ioredis'];(function(_0x1266f9,_0xbba76f){var _0x282acb=function(_0x3237f9){while(--_0x3237f9){_0x1266f9['push'](_0x1266f9['shift']());}};_0x282acb(++_0xbba76f);}(_0x0072,0x189));var _0x2007=function(_0x3f8851,_0x51e8a3){_0x3f8851=_0x3f8851-0x0;var _0xf3440=_0x0072[_0x3f8851];return _0xf3440;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x2007('0x0'));var BPromise=require(_0x2007('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x2007('0x2'));var db=require(_0x2007('0x3'))['db'];var utils=require(_0x2007('0x4'));var logger=require(_0x2007('0x5'))(_0x2007('0x6'));var config=require(_0x2007('0x7'));var jayson=require(_0x2007('0x8'));var client=jayson['client'][_0x2007('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x125eaf,_0x276e24,_0x458656){return new BPromise(function(_0x47a5cc,_0x59431e){return client[_0x2007('0xa')](_0x125eaf,_0x458656)['then'](function(_0x56d889){logger[_0x2007('0xb')](_0x2007('0xc'),_0x276e24,_0x2007('0xd'));logger[_0x2007('0xe')](_0x2007('0xf'),_0x276e24,_0x2007('0xd'),JSON[_0x2007('0x10')](_0x56d889));if(_0x56d889[_0x2007('0x11')]){if(_0x56d889[_0x2007('0x11')][_0x2007('0x12')]===0x1f4){logger['error'](_0x2007('0xc'),_0x276e24,_0x56d889[_0x2007('0x11')][_0x2007('0x13')]);return _0x59431e(_0x56d889[_0x2007('0x11')][_0x2007('0x13')]);}logger[_0x2007('0x11')]('Variable,\x20%s,\x20%s',_0x276e24,_0x56d889[_0x2007('0x11')][_0x2007('0x13')]);return _0x47a5cc(_0x56d889[_0x2007('0x11')][_0x2007('0x13')]);}else{logger[_0x2007('0xb')]('Variable,\x20%s,\x20%s',_0x276e24,_0x2007('0xd'));_0x47a5cc(_0x56d889[_0x2007('0x14')][_0x2007('0x13')]);}})[_0x2007('0x15')](function(_0x27ff9e){logger[_0x2007('0x11')](_0x2007('0xc'),_0x276e24,_0x27ff9e);_0x59431e(_0x27ff9e);});});}exports[_0x2007('0x16')]=function(_0x427776){var _0x5e85f7=this;return new Promise(function(_0x3b5a06,_0x4a65e3){return db[_0x2007('0x17')][_0x2007('0x18')]({'raw':_0x427776[_0x2007('0x19')]?_0x427776['options'][_0x2007('0x1a')]===undefined?!![]:![]:!![],'where':_0x427776[_0x2007('0x19')]?_0x427776[_0x2007('0x19')][_0x2007('0x1b')]||null:null,'attributes':_0x427776[_0x2007('0x19')]?_0x427776['options'][_0x2007('0x1c')]||null:null,'include':_0x427776[_0x2007('0x19')]?_0x427776['options']['include']?_['map'](_0x427776[_0x2007('0x19')][_0x2007('0x1d')],function(_0x36fffe){return{'model':db[_0x36fffe[_0x2007('0x1e')]],'as':_0x36fffe['as'],'attributes':_0x36fffe['attributes'],'include':_0x36fffe[_0x2007('0x1d')]?_[_0x2007('0x1f')](_0x36fffe[_0x2007('0x1d')],function(_0x190c7e){return{'model':db[_0x190c7e[_0x2007('0x1e')]],'as':_0x190c7e['as'],'attributes':_0x190c7e[_0x2007('0x1c')],'include':_0x190c7e[_0x2007('0x1d')]?_[_0x2007('0x1f')](_0x190c7e[_0x2007('0x1d')],function(_0x585f31){return{'model':db[_0x585f31[_0x2007('0x1e')]],'as':_0x585f31['as'],'attributes':_0x585f31[_0x2007('0x1c')]};}):[]};}):[]};}):[]:[]})[_0x2007('0x20')](function(_0x4c4c40){logger[_0x2007('0xb')](_0x2007('0x16'),_0x427776);logger['debug'](_0x2007('0x16'),_0x427776,JSON[_0x2007('0x10')](_0x4c4c40));_0x3b5a06(_0x4c4c40);})['catch'](function(_0x128dc3){logger[_0x2007('0x11')](_0x2007('0x16'),_0x128dc3[_0x2007('0x13')],_0x427776);_0x4a65e3(_0x5e85f7[_0x2007('0x11')](0x1f4,_0x128dc3[_0x2007('0x13')]));});});};
\ No newline at end of file