Built motion from commit (unavailable).|2.5.13
[motion2.git] / server / api / disposition / disposition.rpc.js
index fc97454..14c49d4 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 _0xff03=['ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','request\x20sent','Disposition,\x20%s,\x20%s,\x20%s','stringify','Disposition,\x20%s,\x20%s','error','message','info','util','moment','bluebird','randomstring'];(function(_0x25b40a,_0x2652a7){var _0x2cd93f=function(_0x46b4b4){while(--_0x46b4b4){_0x25b40a['push'](_0x25b40a['shift']());}};_0x2cd93f(++_0x2652a7);}(_0xff03,0xa4));var _0x3ff0=function(_0x31f231,_0x4233b3){_0x31f231=_0x31f231-0x0;var _0x4e5321=_0xff03[_0x31f231];return _0x4e5321;};'use strict';var _=require('lodash');var util=require(_0x3ff0('0x0'));var moment=require(_0x3ff0('0x1'));var BPromise=require(_0x3ff0('0x2'));var rs=require(_0x3ff0('0x3'));var fs=require('fs');var Redis=require(_0x3ff0('0x4'));var db=require(_0x3ff0('0x5'))['db'];var utils=require(_0x3ff0('0x6'));var logger=require(_0x3ff0('0x7'))(_0x3ff0('0x8'));var config=require(_0x3ff0('0x9'));var jayson=require(_0x3ff0('0xa'));var client=jayson[_0x3ff0('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x6c5f03,_0x5af4bc,_0x39bf68){return new BPromise(function(_0x407fe0,_0x433d72){return client[_0x3ff0('0xc')](_0x6c5f03,_0x39bf68)[_0x3ff0('0xd')](function(_0x288a6b){logger['info']('Disposition,\x20%s,\x20%s',_0x5af4bc,_0x3ff0('0xe'));logger['debug'](_0x3ff0('0xf'),_0x5af4bc,'request\x20sent',JSON[_0x3ff0('0x10')](_0x288a6b));if(_0x288a6b['error']){if(_0x288a6b['error']['code']===0x1f4){logger['error'](_0x3ff0('0x11'),_0x5af4bc,_0x288a6b[_0x3ff0('0x12')][_0x3ff0('0x13')]);return _0x433d72(_0x288a6b['error'][_0x3ff0('0x13')]);}logger[_0x3ff0('0x12')](_0x3ff0('0x11'),_0x5af4bc,_0x288a6b['error']['message']);return _0x407fe0(_0x288a6b[_0x3ff0('0x12')][_0x3ff0('0x13')]);}else{logger[_0x3ff0('0x14')]('Disposition,\x20%s,\x20%s',_0x5af4bc,_0x3ff0('0xe'));_0x407fe0(_0x288a6b['result'][_0x3ff0('0x13')]);}})['catch'](function(_0x5516f4){logger[_0x3ff0('0x12')](_0x3ff0('0x11'),_0x5af4bc,_0x5516f4);_0x433d72(_0x5516f4);});});}
\ No newline at end of file