Built motion from commit (unavailable).|2.4.20
[motion2.git] / server / api / disposition / disposition.rpc.js
index 8cb799b..80423d1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcbb1=['message','result','catch','lodash','util','moment','../../config/logger','rpc','jayson/promise','http','request','then','info','request\x20sent','debug','Disposition,\x20%s,\x20%s,\x20%s','stringify','error','code','Disposition,\x20%s,\x20%s'];(function(_0x4b793b,_0x1ee112){var _0xcfbd6a=function(_0x2eb91c){while(--_0x2eb91c){_0x4b793b['push'](_0x4b793b['shift']());}};_0xcfbd6a(++_0x1ee112);}(_0xcbb1,0x1a7));var _0x1cbb=function(_0x361634,_0x2693da){_0x361634=_0x361634-0x0;var _0x43c535=_0xcbb1[_0x361634];return _0x43c535;};'use strict';var _=require(_0x1cbb('0x0'));var util=require(_0x1cbb('0x1'));var moment=require(_0x1cbb('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x1cbb('0x3'))(_0x1cbb('0x4'));var config=require('../../config/environment');var jayson=require(_0x1cbb('0x5'));var client=jayson['client'][_0x1cbb('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x266629,_0x30a13b,_0x2a8672){return new BPromise(function(_0x33ace7,_0x2668ce){return client[_0x1cbb('0x7')](_0x266629,_0x2a8672)[_0x1cbb('0x8')](function(_0x36894b){logger[_0x1cbb('0x9')]('Disposition,\x20%s,\x20%s',_0x30a13b,_0x1cbb('0xa'));logger[_0x1cbb('0xb')](_0x1cbb('0xc'),_0x30a13b,_0x1cbb('0xa'),JSON[_0x1cbb('0xd')](_0x36894b));if(_0x36894b[_0x1cbb('0xe')]){if(_0x36894b[_0x1cbb('0xe')][_0x1cbb('0xf')]===0x1f4){logger[_0x1cbb('0xe')](_0x1cbb('0x10'),_0x30a13b,_0x36894b['error'][_0x1cbb('0x11')]);return _0x2668ce(_0x36894b[_0x1cbb('0xe')][_0x1cbb('0x11')]);}logger['error'](_0x1cbb('0x10'),_0x30a13b,_0x36894b[_0x1cbb('0xe')][_0x1cbb('0x11')]);return _0x33ace7(_0x36894b[_0x1cbb('0xe')]['message']);}else{logger[_0x1cbb('0x9')](_0x1cbb('0x10'),_0x30a13b,_0x1cbb('0xa'));_0x33ace7(_0x36894b[_0x1cbb('0x12')][_0x1cbb('0x11')]);}})[_0x1cbb('0x13')](function(_0x5e8d01){logger[_0x1cbb('0xe')](_0x1cbb('0x10'),_0x30a13b,_0x5e8d01);_0x2668ce(_0x5e8d01);});});}
\ No newline at end of file
+var _0xa803=['bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','request\x20sent','Disposition,\x20%s,\x20%s,\x20%s','stringify','error','code','Disposition,\x20%s,\x20%s','message','info','result','catch','lodash','util','moment'];(function(_0x3a3e6e,_0x437020){var _0x3514ee=function(_0x426bce){while(--_0x426bce){_0x3a3e6e['push'](_0x3a3e6e['shift']());}};_0x3514ee(++_0x437020);}(_0xa803,0xad));var _0x3a80=function(_0x201ec8,_0x533426){_0x201ec8=_0x201ec8-0x0;var _0x37f802=_0xa803[_0x201ec8];return _0x37f802;};'use strict';var _=require(_0x3a80('0x0'));var util=require(_0x3a80('0x1'));var moment=require(_0x3a80('0x2'));var BPromise=require(_0x3a80('0x3'));var rs=require(_0x3a80('0x4'));var fs=require('fs');var Redis=require(_0x3a80('0x5'));var db=require(_0x3a80('0x6'))['db'];var utils=require(_0x3a80('0x7'));var logger=require(_0x3a80('0x8'))(_0x3a80('0x9'));var config=require(_0x3a80('0xa'));var jayson=require(_0x3a80('0xb'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x5e0d5d,_0x17498d,_0x51573a){return new BPromise(function(_0x4e7fb1,_0x2a0069){return client['request'](_0x5e0d5d,_0x51573a)['then'](function(_0x553680){logger['info']('Disposition,\x20%s,\x20%s',_0x17498d,_0x3a80('0xc'));logger['debug'](_0x3a80('0xd'),_0x17498d,'request\x20sent',JSON[_0x3a80('0xe')](_0x553680));if(_0x553680[_0x3a80('0xf')]){if(_0x553680['error'][_0x3a80('0x10')]===0x1f4){logger['error'](_0x3a80('0x11'),_0x17498d,_0x553680['error'][_0x3a80('0x12')]);return _0x2a0069(_0x553680[_0x3a80('0xf')][_0x3a80('0x12')]);}logger[_0x3a80('0xf')](_0x3a80('0x11'),_0x17498d,_0x553680[_0x3a80('0xf')][_0x3a80('0x12')]);return _0x4e7fb1(_0x553680[_0x3a80('0xf')][_0x3a80('0x12')]);}else{logger[_0x3a80('0x13')](_0x3a80('0x11'),_0x17498d,_0x3a80('0xc'));_0x4e7fb1(_0x553680[_0x3a80('0x14')][_0x3a80('0x12')]);}})[_0x3a80('0x15')](function(_0x3ecd79){logger[_0x3a80('0xf')](_0x3a80('0x11'),_0x17498d,_0x3ecd79);_0x2a0069(_0x3ecd79);});});}
\ No newline at end of file