Built motion from commit b0a9a629.|2.6.33
[motion2.git] / server / api / intDeskField / intDeskField.rpc.js
index cab511e..53a7d9a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb9c9=['catch','util','moment','randomstring','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','request','then','info','DeskField,\x20%s,\x20%s','request\x20sent','debug','error','code','message','result'];(function(_0x179a02,_0x3f845d){var _0x55c5a8=function(_0x58529f){while(--_0x58529f){_0x179a02['push'](_0x179a02['shift']());}};_0x55c5a8(++_0x3f845d);}(_0xb9c9,0x1c9));var _0x9b9c=function(_0x5e8014,_0x538303){_0x5e8014=_0x5e8014-0x0;var _0x23ea5c=_0xb9c9[_0x5e8014];return _0x23ea5c;};'use strict';var _=require('lodash');var util=require(_0x9b9c('0x0'));var moment=require(_0x9b9c('0x1'));var BPromise=require('bluebird');var rs=require(_0x9b9c('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x9b9c('0x3'));var logger=require(_0x9b9c('0x4'))(_0x9b9c('0x5'));var config=require(_0x9b9c('0x6'));var jayson=require(_0x9b9c('0x7'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x15cb91,_0x35a917,_0x316378){return new BPromise(function(_0x3f32e9,_0xc499bf){return client[_0x9b9c('0x8')](_0x15cb91,_0x316378)[_0x9b9c('0x9')](function(_0x50cec1){logger[_0x9b9c('0xa')](_0x9b9c('0xb'),_0x35a917,_0x9b9c('0xc'));logger[_0x9b9c('0xd')]('DeskField,\x20%s,\x20%s,\x20%s',_0x35a917,'request\x20sent',JSON['stringify'](_0x50cec1));if(_0x50cec1[_0x9b9c('0xe')]){if(_0x50cec1['error'][_0x9b9c('0xf')]===0x1f4){logger['error']('DeskField,\x20%s,\x20%s',_0x35a917,_0x50cec1[_0x9b9c('0xe')][_0x9b9c('0x10')]);return _0xc499bf(_0x50cec1[_0x9b9c('0xe')][_0x9b9c('0x10')]);}logger['error']('DeskField,\x20%s,\x20%s',_0x35a917,_0x50cec1[_0x9b9c('0xe')]['message']);return _0x3f32e9(_0x50cec1[_0x9b9c('0xe')]['message']);}else{logger[_0x9b9c('0xa')](_0x9b9c('0xb'),_0x35a917,'request\x20sent');_0x3f32e9(_0x50cec1[_0x9b9c('0x11')]['message']);}})[_0x9b9c('0x12')](function(_0x49cd31){logger[_0x9b9c('0xe')](_0x9b9c('0xb'),_0x35a917,_0x49cd31);_0xc499bf(_0x49cd31);});});}
\ No newline at end of file
+var _0x5ae1=['bluebird','ioredis','../../mysqldb','../../config/utils','jayson/promise','client','http','request','then','info','DeskField,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','catch','moment'];(function(_0x13138c,_0x3197c5){var _0x105f93=function(_0x1c3c76){while(--_0x1c3c76){_0x13138c['push'](_0x13138c['shift']());}};_0x105f93(++_0x3197c5);}(_0x5ae1,0x179));var _0x15ae=function(_0x7e77b2,_0x16ec94){_0x7e77b2=_0x7e77b2-0x0;var _0x4b5a00=_0x5ae1[_0x7e77b2];return _0x4b5a00;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x15ae('0x0'));var BPromise=require(_0x15ae('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x15ae('0x2'));var db=require(_0x15ae('0x3'))['db'];var utils=require(_0x15ae('0x4'));var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require(_0x15ae('0x5'));var client=jayson[_0x15ae('0x6')][_0x15ae('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x12f7e5,_0x265dee,_0x56182e){return new BPromise(function(_0x4b1865,_0x5aedf2){return client[_0x15ae('0x8')](_0x12f7e5,_0x56182e)[_0x15ae('0x9')](function(_0x4c5a1d){logger[_0x15ae('0xa')](_0x15ae('0xb'),_0x265dee,_0x15ae('0xc'));logger['debug']('DeskField,\x20%s,\x20%s,\x20%s',_0x265dee,'request\x20sent',JSON[_0x15ae('0xd')](_0x4c5a1d));if(_0x4c5a1d[_0x15ae('0xe')]){if(_0x4c5a1d[_0x15ae('0xe')]['code']===0x1f4){logger[_0x15ae('0xe')](_0x15ae('0xb'),_0x265dee,_0x4c5a1d[_0x15ae('0xe')][_0x15ae('0xf')]);return _0x5aedf2(_0x4c5a1d[_0x15ae('0xe')][_0x15ae('0xf')]);}logger[_0x15ae('0xe')](_0x15ae('0xb'),_0x265dee,_0x4c5a1d['error']['message']);return _0x4b1865(_0x4c5a1d[_0x15ae('0xe')][_0x15ae('0xf')]);}else{logger[_0x15ae('0xa')]('DeskField,\x20%s,\x20%s',_0x265dee,'request\x20sent');_0x4b1865(_0x4c5a1d[_0x15ae('0x10')][_0x15ae('0xf')]);}})[_0x15ae('0x11')](function(_0x416bc4){logger[_0x15ae('0xe')](_0x15ae('0xb'),_0x265dee,_0x416bc4);_0x5aedf2(_0x416bc4);});});}
\ No newline at end of file