Built motion from commit (unavailable).|2.5.23
[motion2.git] / server / api / disposition / disposition.rpc.js
index fc97454..995fe22 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf3ca=['debug','Disposition,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','Disposition,\x20%s,\x20%s','request\x20sent'];(function(_0x6aa584,_0x1c1525){var _0x83fc01=function(_0xe96a0c){while(--_0xe96a0c){_0x6aa584['push'](_0x6aa584['shift']());}};_0x83fc01(++_0x1c1525);}(_0xf3ca,0xbf));var _0xaf3c=function(_0x162810,_0x4dd5aa){_0x162810=_0x162810-0x0;var _0x503762=_0xf3ca[_0x162810];return _0x503762;};'use strict';var _=require('lodash');var util=require(_0xaf3c('0x0'));var moment=require(_0xaf3c('0x1'));var BPromise=require(_0xaf3c('0x2'));var rs=require(_0xaf3c('0x3'));var fs=require('fs');var Redis=require(_0xaf3c('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xaf3c('0x5'));var logger=require(_0xaf3c('0x6'))(_0xaf3c('0x7'));var config=require(_0xaf3c('0x8'));var jayson=require(_0xaf3c('0x9'));var client=jayson['client'][_0xaf3c('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xd9c676,_0x760e0f,_0x55d515){return new BPromise(function(_0x1ac85a,_0x26dd6b){return client[_0xaf3c('0xb')](_0xd9c676,_0x55d515)[_0xaf3c('0xc')](function(_0x328592){logger[_0xaf3c('0xd')](_0xaf3c('0xe'),_0x760e0f,_0xaf3c('0xf'));logger[_0xaf3c('0x10')](_0xaf3c('0x11'),_0x760e0f,_0xaf3c('0xf'),JSON[_0xaf3c('0x12')](_0x328592));if(_0x328592[_0xaf3c('0x13')]){if(_0x328592[_0xaf3c('0x13')][_0xaf3c('0x14')]===0x1f4){logger[_0xaf3c('0x13')](_0xaf3c('0xe'),_0x760e0f,_0x328592[_0xaf3c('0x13')][_0xaf3c('0x15')]);return _0x26dd6b(_0x328592['error'][_0xaf3c('0x15')]);}logger['error']('Disposition,\x20%s,\x20%s',_0x760e0f,_0x328592['error']['message']);return _0x1ac85a(_0x328592[_0xaf3c('0x13')][_0xaf3c('0x15')]);}else{logger['info']('Disposition,\x20%s,\x20%s',_0x760e0f,_0xaf3c('0xf'));_0x1ac85a(_0x328592[_0xaf3c('0x16')][_0xaf3c('0x15')]);}})['catch'](function(_0x2fac67){logger[_0xaf3c('0x13')](_0xaf3c('0xe'),_0x760e0f,_0x2fac67);_0x26dd6b(_0x2fac67);});});}
\ No newline at end of file
+var _0xc1fe=['moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','http','request','info','request\x20sent','Disposition,\x20%s,\x20%s,\x20%s','error','code','Disposition,\x20%s,\x20%s','message','catch','lodash','util'];(function(_0x58bb01,_0x231a96){var _0x111373=function(_0x33031a){while(--_0x33031a){_0x58bb01['push'](_0x58bb01['shift']());}};_0x111373(++_0x231a96);}(_0xc1fe,0xb2));var _0xec1f=function(_0xfdc7b1,_0x295c90){_0xfdc7b1=_0xfdc7b1-0x0;var _0x395b66=_0xc1fe[_0xfdc7b1];return _0x395b66;};'use strict';var _=require(_0xec1f('0x0'));var util=require(_0xec1f('0x1'));var moment=require(_0xec1f('0x2'));var BPromise=require(_0xec1f('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xec1f('0x4'));var db=require(_0xec1f('0x5'))['db'];var utils=require(_0xec1f('0x6'));var logger=require(_0xec1f('0x7'))(_0xec1f('0x8'));var config=require(_0xec1f('0x9'));var jayson=require('jayson/promise');var client=jayson['client'][_0xec1f('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x33d574,_0x5682a8,_0x44d859){return new BPromise(function(_0x55c9e3,_0x511f2b){return client[_0xec1f('0xb')](_0x33d574,_0x44d859)['then'](function(_0x3a4bd5){logger[_0xec1f('0xc')]('Disposition,\x20%s,\x20%s',_0x5682a8,_0xec1f('0xd'));logger['debug'](_0xec1f('0xe'),_0x5682a8,_0xec1f('0xd'),JSON['stringify'](_0x3a4bd5));if(_0x3a4bd5[_0xec1f('0xf')]){if(_0x3a4bd5[_0xec1f('0xf')][_0xec1f('0x10')]===0x1f4){logger[_0xec1f('0xf')](_0xec1f('0x11'),_0x5682a8,_0x3a4bd5[_0xec1f('0xf')]['message']);return _0x511f2b(_0x3a4bd5[_0xec1f('0xf')][_0xec1f('0x12')]);}logger[_0xec1f('0xf')](_0xec1f('0x11'),_0x5682a8,_0x3a4bd5[_0xec1f('0xf')][_0xec1f('0x12')]);return _0x55c9e3(_0x3a4bd5['error'][_0xec1f('0x12')]);}else{logger[_0xec1f('0xc')](_0xec1f('0x11'),_0x5682a8,_0xec1f('0xd'));_0x55c9e3(_0x3a4bd5['result'][_0xec1f('0x12')]);}})[_0xec1f('0x13')](function(_0x123de1){logger[_0xec1f('0xf')](_0xec1f('0x11'),_0x5682a8,_0x123de1);_0x511f2b(_0x123de1);});});}
\ No newline at end of file