X-Git-Url: http://repos.xcallymotion.com/?a=blobdiff_plain;f=server%2Fapi%2FchatProactiveAction%2FchatProactiveAction.rpc.js;h=1f5ff190ca6cc7fd3db1fe9ffb2990360a20fae3;hb=c593ef5de079879fb7bfbdd8f8d4d8640e684821;hp=dade1016141bf7b16879a982877c7613fa6588c7;hpb=7b947914a77b8347fb1d6de0275fa1bbfcdf6ff9;p=motion2.git diff --git a/server/api/chatProactiveAction/chatProactiveAction.rpc.js b/server/api/chatProactiveAction/chatProactiveAction.rpc.js index dade101..1f5ff19 100644 --- a/server/api/chatProactiveAction/chatProactiveAction.rpc.js +++ b/server/api/chatProactiveAction/chatProactiveAction.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8347=['util','bluebird','ioredis','../../config/utils','../../config/logger','client','http','request','then','info','request\x20sent','stringify','error','code','ChatProactiveAction,\x20%s,\x20%s','message','result','catch','lodash'];(function(_0x588b49,_0x1bc27e){var _0x20079e=function(_0x784472){while(--_0x784472){_0x588b49['push'](_0x588b49['shift']());}};_0x20079e(++_0x1bc27e);}(_0x8347,0x142));var _0x7834=function(_0x3bbc13,_0x4ea5da){_0x3bbc13=_0x3bbc13-0x0;var _0x3e73fc=_0x8347[_0x3bbc13];return _0x3e73fc;};'use strict';var _=require(_0x7834('0x0'));var util=require(_0x7834('0x1'));var moment=require('moment');var BPromise=require(_0x7834('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x7834('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x7834('0x4'));var logger=require(_0x7834('0x5'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x7834('0x6')][_0x7834('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x27b8ea,_0x4bc03c,_0xeba0cb){return new BPromise(function(_0x1945e4,_0x356f51){return client[_0x7834('0x8')](_0x27b8ea,_0xeba0cb)[_0x7834('0x9')](function(_0x4c4991){logger[_0x7834('0xa')]('ChatProactiveAction,\x20%s,\x20%s',_0x4bc03c,_0x7834('0xb'));logger['debug']('ChatProactiveAction,\x20%s,\x20%s,\x20%s',_0x4bc03c,_0x7834('0xb'),JSON[_0x7834('0xc')](_0x4c4991));if(_0x4c4991[_0x7834('0xd')]){if(_0x4c4991['error'][_0x7834('0xe')]===0x1f4){logger[_0x7834('0xd')](_0x7834('0xf'),_0x4bc03c,_0x4c4991[_0x7834('0xd')]['message']);return _0x356f51(_0x4c4991[_0x7834('0xd')][_0x7834('0x10')]);}logger['error']('ChatProactiveAction,\x20%s,\x20%s',_0x4bc03c,_0x4c4991[_0x7834('0xd')][_0x7834('0x10')]);return _0x1945e4(_0x4c4991[_0x7834('0xd')][_0x7834('0x10')]);}else{logger['info'](_0x7834('0xf'),_0x4bc03c,'request\x20sent');_0x1945e4(_0x4c4991[_0x7834('0x11')][_0x7834('0x10')]);}})[_0x7834('0x12')](function(_0x104e9a){logger['error'](_0x7834('0xf'),_0x4bc03c,_0x104e9a);_0x356f51(_0x104e9a);});});} \ No newline at end of file +var _0x7488=['../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','ChatProactiveAction,\x20%s,\x20%s','request\x20sent','debug','ChatProactiveAction,\x20%s,\x20%s,\x20%s','stringify','error','message','info','result','catch','lodash','util','moment','bluebird','ioredis'];(function(_0x382602,_0x5e9d2d){var _0x14dda6=function(_0xf65c39){while(--_0xf65c39){_0x382602['push'](_0x382602['shift']());}};_0x14dda6(++_0x5e9d2d);}(_0x7488,0x8b));var _0x8748=function(_0x1f1ed0,_0x33d422){_0x1f1ed0=_0x1f1ed0-0x0;var _0x4a85cc=_0x7488[_0x1f1ed0];return _0x4a85cc;};'use strict';var _=require(_0x8748('0x0'));var util=require(_0x8748('0x1'));var moment=require(_0x8748('0x2'));var BPromise=require(_0x8748('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x8748('0x4'));var db=require(_0x8748('0x5'))['db'];var utils=require(_0x8748('0x6'));var logger=require(_0x8748('0x7'))(_0x8748('0x8'));var config=require('../../config/environment');var jayson=require(_0x8748('0x9'));var client=jayson[_0x8748('0xa')][_0x8748('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x47b196,_0x16d7c0,_0x125ff4){return new BPromise(function(_0x57fc10,_0x55a929){return client[_0x8748('0xc')](_0x47b196,_0x125ff4)[_0x8748('0xd')](function(_0x424f03){logger['info'](_0x8748('0xe'),_0x16d7c0,_0x8748('0xf'));logger[_0x8748('0x10')](_0x8748('0x11'),_0x16d7c0,'request\x20sent',JSON[_0x8748('0x12')](_0x424f03));if(_0x424f03[_0x8748('0x13')]){if(_0x424f03[_0x8748('0x13')]['code']===0x1f4){logger[_0x8748('0x13')](_0x8748('0xe'),_0x16d7c0,_0x424f03['error'][_0x8748('0x14')]);return _0x55a929(_0x424f03[_0x8748('0x13')]['message']);}logger['error'](_0x8748('0xe'),_0x16d7c0,_0x424f03[_0x8748('0x13')][_0x8748('0x14')]);return _0x57fc10(_0x424f03[_0x8748('0x13')][_0x8748('0x14')]);}else{logger[_0x8748('0x15')](_0x8748('0xe'),_0x16d7c0,_0x8748('0xf'));_0x57fc10(_0x424f03[_0x8748('0x16')][_0x8748('0x14')]);}})[_0x8748('0x17')](function(_0x5d1ac7){logger[_0x8748('0x13')](_0x8748('0xe'),_0x16d7c0,_0x5d1ac7);_0x55a929(_0x5d1ac7);});});} \ No newline at end of file