Built motion from commit (unavailable).|2.5.24
[motion2.git] / server / api / tag / tag.rpc.js
index 3c51a1c..f063741 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa902=['message','result','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','rpc','../../config/environment','jayson/promise','client','http','request','then','info','Tag,\x20%s,\x20%s','debug','Tag,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error'];(function(_0xabfec4,_0x35076e){var _0x7bafa2=function(_0x52d551){while(--_0x52d551){_0xabfec4['push'](_0xabfec4['shift']());}};_0x7bafa2(++_0x35076e);}(_0xa902,0x8d));var _0x2a90=function(_0x325ae8,_0x2c21ba){_0x325ae8=_0x325ae8-0x0;var _0x4c272c=_0xa902[_0x325ae8];return _0x4c272c;};'use strict';var _=require(_0x2a90('0x0'));var util=require(_0x2a90('0x1'));var moment=require(_0x2a90('0x2'));var BPromise=require(_0x2a90('0x3'));var rs=require(_0x2a90('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x2a90('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x2a90('0x6'));var config=require(_0x2a90('0x7'));var jayson=require(_0x2a90('0x8'));var client=jayson[_0x2a90('0x9')][_0x2a90('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x25bcfc,_0x58369a,_0x4109e6){return new BPromise(function(_0x570659,_0x5ec2b9){return client[_0x2a90('0xb')](_0x25bcfc,_0x4109e6)[_0x2a90('0xc')](function(_0xe500bc){logger[_0x2a90('0xd')](_0x2a90('0xe'),_0x58369a,'request\x20sent');logger[_0x2a90('0xf')](_0x2a90('0x10'),_0x58369a,_0x2a90('0x11'),JSON[_0x2a90('0x12')](_0xe500bc));if(_0xe500bc['error']){if(_0xe500bc[_0x2a90('0x13')]['code']===0x1f4){logger[_0x2a90('0x13')]('Tag,\x20%s,\x20%s',_0x58369a,_0xe500bc[_0x2a90('0x13')]['message']);return _0x5ec2b9(_0xe500bc[_0x2a90('0x13')][_0x2a90('0x14')]);}logger[_0x2a90('0x13')]('Tag,\x20%s,\x20%s',_0x58369a,_0xe500bc['error']['message']);return _0x570659(_0xe500bc[_0x2a90('0x13')][_0x2a90('0x14')]);}else{logger['info'](_0x2a90('0xe'),_0x58369a,_0x2a90('0x11'));_0x570659(_0xe500bc[_0x2a90('0x15')][_0x2a90('0x14')]);}})[_0x2a90('0x16')](function(_0x37858e){logger[_0x2a90('0x13')](_0x2a90('0xe'),_0x58369a,_0x37858e);_0x5ec2b9(_0x37858e);});});}
\ No newline at end of file
+var _0xda3f=['rpc','jayson/promise','client','request','then','info','Tag,\x20%s,\x20%s','request\x20sent','debug','Tag,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','util','moment','../../mysqldb','../../config/logger'];(function(_0x1795df,_0xcb261e){var _0x3f13c0=function(_0x52c5cf){while(--_0x52c5cf){_0x1795df['push'](_0x1795df['shift']());}};_0x3f13c0(++_0xcb261e);}(_0xda3f,0xec));var _0xfda3=function(_0x41d232,_0x22e132){_0x41d232=_0x41d232-0x0;var _0x3b5730=_0xda3f[_0x41d232];return _0x3b5730;};'use strict';var _=require('lodash');var util=require(_0xfda3('0x0'));var moment=require(_0xfda3('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xfda3('0x2'))['db'];var utils=require('../../config/utils');var logger=require(_0xfda3('0x3'))(_0xfda3('0x4'));var config=require('../../config/environment');var jayson=require(_0xfda3('0x5'));var client=jayson[_0xfda3('0x6')]['http']({'port':0x232a});function respondWithRpcPromise(_0x4e72d1,_0x316792,_0x42476a){return new BPromise(function(_0x125e2a,_0x4018c0){return client[_0xfda3('0x7')](_0x4e72d1,_0x42476a)[_0xfda3('0x8')](function(_0x46655c){logger[_0xfda3('0x9')](_0xfda3('0xa'),_0x316792,_0xfda3('0xb'));logger[_0xfda3('0xc')](_0xfda3('0xd'),_0x316792,'request\x20sent',JSON[_0xfda3('0xe')](_0x46655c));if(_0x46655c[_0xfda3('0xf')]){if(_0x46655c[_0xfda3('0xf')][_0xfda3('0x10')]===0x1f4){logger[_0xfda3('0xf')]('Tag,\x20%s,\x20%s',_0x316792,_0x46655c[_0xfda3('0xf')]['message']);return _0x4018c0(_0x46655c[_0xfda3('0xf')][_0xfda3('0x11')]);}logger['error']('Tag,\x20%s,\x20%s',_0x316792,_0x46655c['error'][_0xfda3('0x11')]);return _0x125e2a(_0x46655c[_0xfda3('0xf')]['message']);}else{logger['info']('Tag,\x20%s,\x20%s',_0x316792,_0xfda3('0xb'));_0x125e2a(_0x46655c[_0xfda3('0x12')][_0xfda3('0x11')]);}})[_0xfda3('0x13')](function(_0x34900d){logger[_0xfda3('0xf')](_0xfda3('0xa'),_0x316792,_0x34900d);_0x4018c0(_0x34900d);});});}
\ No newline at end of file