Built motion from commit (unavailable).|2.5.4
[motion2.git] / server / api / analyticCustomReport / analyticCustomReport.rpc.js
index b4c2bed..da9354e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5e87=['../../config/logger','../../config/environment','jayson/promise','http','request','then','info','AnalyticCustomReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticCustomReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','moment','ioredis','../../mysqldb','../../config/utils'];(function(_0x54de5d,_0x1f8b26){var _0x1b349e=function(_0xe199cc){while(--_0xe199cc){_0x54de5d['push'](_0x54de5d['shift']());}};_0x1b349e(++_0x1f8b26);}(_0x5e87,0x119));var _0x75e8=function(_0x1646af,_0x411b04){_0x1646af=_0x1646af-0x0;var _0x5c9714=_0x5e87[_0x1646af];return _0x5c9714;};'use strict';var _=require(_0x75e8('0x0'));var util=require('util');var moment=require(_0x75e8('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x75e8('0x2'));var db=require(_0x75e8('0x3'))['db'];var utils=require(_0x75e8('0x4'));var logger=require(_0x75e8('0x5'))('rpc');var config=require(_0x75e8('0x6'));var jayson=require(_0x75e8('0x7'));var client=jayson['client'][_0x75e8('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x458aad,_0x4f98d5,_0x5792ac){return new BPromise(function(_0x3857ca,_0x54577c){return client[_0x75e8('0x9')](_0x458aad,_0x5792ac)[_0x75e8('0xa')](function(_0x55ede3){logger[_0x75e8('0xb')](_0x75e8('0xc'),_0x4f98d5,_0x75e8('0xd'));logger[_0x75e8('0xe')](_0x75e8('0xf'),_0x4f98d5,'request\x20sent',JSON[_0x75e8('0x10')](_0x55ede3));if(_0x55ede3[_0x75e8('0x11')]){if(_0x55ede3[_0x75e8('0x11')][_0x75e8('0x12')]===0x1f4){logger['error']('AnalyticCustomReport,\x20%s,\x20%s',_0x4f98d5,_0x55ede3[_0x75e8('0x11')][_0x75e8('0x13')]);return _0x54577c(_0x55ede3['error'][_0x75e8('0x13')]);}logger[_0x75e8('0x11')]('AnalyticCustomReport,\x20%s,\x20%s',_0x4f98d5,_0x55ede3[_0x75e8('0x11')][_0x75e8('0x13')]);return _0x3857ca(_0x55ede3[_0x75e8('0x11')][_0x75e8('0x13')]);}else{logger['info'](_0x75e8('0xc'),_0x4f98d5,_0x75e8('0xd'));_0x3857ca(_0x55ede3[_0x75e8('0x14')][_0x75e8('0x13')]);}})[_0x75e8('0x15')](function(_0x161a82){logger[_0x75e8('0x11')](_0x75e8('0xc'),_0x4f98d5,_0x161a82);_0x54577c(_0x161a82);});});}
\ No newline at end of file
+var _0xb8fa=['jayson/promise','client','request','then','AnalyticCustomReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticCustomReport,\x20%s,\x20%s,\x20%s','error','message','info','lodash','moment','bluebird','../../config/utils','../../config/logger','../../config/environment'];(function(_0x5d575c,_0x38008f){var _0x27f2ba=function(_0x4c1f81){while(--_0x4c1f81){_0x5d575c['push'](_0x5d575c['shift']());}};_0x27f2ba(++_0x38008f);}(_0xb8fa,0xb5));var _0xab8f=function(_0x19faba,_0x47751f){_0x19faba=_0x19faba-0x0;var _0x32f8ed=_0xb8fa[_0x19faba];return _0x32f8ed;};'use strict';var _=require(_0xab8f('0x0'));var util=require('util');var moment=require(_0xab8f('0x1'));var BPromise=require(_0xab8f('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xab8f('0x3'));var logger=require(_0xab8f('0x4'))('rpc');var config=require(_0xab8f('0x5'));var jayson=require(_0xab8f('0x6'));var client=jayson[_0xab8f('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x96ced5,_0x16ce68,_0x3d0c98){return new BPromise(function(_0x48b63f,_0x339d9a){return client[_0xab8f('0x8')](_0x96ced5,_0x3d0c98)[_0xab8f('0x9')](function(_0x226973){logger['info'](_0xab8f('0xa'),_0x16ce68,_0xab8f('0xb'));logger[_0xab8f('0xc')](_0xab8f('0xd'),_0x16ce68,_0xab8f('0xb'),JSON['stringify'](_0x226973));if(_0x226973[_0xab8f('0xe')]){if(_0x226973[_0xab8f('0xe')]['code']===0x1f4){logger['error'](_0xab8f('0xa'),_0x16ce68,_0x226973['error'][_0xab8f('0xf')]);return _0x339d9a(_0x226973['error'][_0xab8f('0xf')]);}logger[_0xab8f('0xe')]('AnalyticCustomReport,\x20%s,\x20%s',_0x16ce68,_0x226973[_0xab8f('0xe')]['message']);return _0x48b63f(_0x226973[_0xab8f('0xe')][_0xab8f('0xf')]);}else{logger[_0xab8f('0x10')](_0xab8f('0xa'),_0x16ce68,_0xab8f('0xb'));_0x48b63f(_0x226973['result'][_0xab8f('0xf')]);}})['catch'](function(_0x34eca4){logger[_0xab8f('0xe')](_0xab8f('0xa'),_0x16ce68,_0x34eca4);_0x339d9a(_0x34eca4);});});}
\ No newline at end of file