X-Git-Url: http://repos.xcallymotion.com/?a=blobdiff_plain;f=server%2Fapi%2FchatProactiveAction%2FchatProactiveAction.rpc.js;h=8a2c58c31c4cb91ce2832ef5d08eb75f4c344ea1;hb=3b6ec49862a5197d06e7453a43d40dcd68709ea0;hp=aac22d4ae373c0a652d4fce833d52f483b1ba277;hpb=ed368fdfe923471c0749d5720e7df57649e4ed09;p=motion2.git diff --git a/server/api/chatProactiveAction/chatProactiveAction.rpc.js b/server/api/chatProactiveAction/chatProactiveAction.rpc.js index aac22d4..8a2c58c 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 _0xcb8b=['request\x20sent','debug','error','code','message','result','lodash','util','moment','bluebird','ioredis','../../config/logger','jayson/promise','client','http','info','ChatProactiveAction,\x20%s,\x20%s'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0xcb8b,0x6c));var _0xbcb8=function(_0x9449a1,_0x53b397){_0x9449a1=_0x9449a1-0x0;var _0x1447df=_0xcb8b[_0x9449a1];return _0x1447df;};'use strict';var _=require(_0xbcb8('0x0'));var util=require(_0xbcb8('0x1'));var moment=require(_0xbcb8('0x2'));var BPromise=require(_0xbcb8('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xbcb8('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xbcb8('0x5'))('rpc');var config=require('../../config/environment');var jayson=require(_0xbcb8('0x6'));var client=jayson[_0xbcb8('0x7')][_0xbcb8('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x687105,_0x22813c,_0x59772f){return new BPromise(function(_0x460740,_0x15d439){return client['request'](_0x687105,_0x59772f)['then'](function(_0x1e765e){logger[_0xbcb8('0x9')](_0xbcb8('0xa'),_0x22813c,_0xbcb8('0xb'));logger[_0xbcb8('0xc')]('ChatProactiveAction,\x20%s,\x20%s,\x20%s',_0x22813c,_0xbcb8('0xb'),JSON['stringify'](_0x1e765e));if(_0x1e765e['error']){if(_0x1e765e[_0xbcb8('0xd')][_0xbcb8('0xe')]===0x1f4){logger[_0xbcb8('0xd')](_0xbcb8('0xa'),_0x22813c,_0x1e765e['error'][_0xbcb8('0xf')]);return _0x15d439(_0x1e765e['error']['message']);}logger[_0xbcb8('0xd')](_0xbcb8('0xa'),_0x22813c,_0x1e765e[_0xbcb8('0xd')][_0xbcb8('0xf')]);return _0x460740(_0x1e765e[_0xbcb8('0xd')][_0xbcb8('0xf')]);}else{logger['info'](_0xbcb8('0xa'),_0x22813c,'request\x20sent');_0x460740(_0x1e765e[_0xbcb8('0x10')]['message']);}})['catch'](function(_0x24c446){logger[_0xbcb8('0xd')](_0xbcb8('0xa'),_0x22813c,_0x24c446);_0x15d439(_0x24c446);});});} \ No newline at end of file +var _0x0d2a=['ChatProactiveAction,\x20%s,\x20%s','result','catch','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','info','debug','ChatProactiveAction,\x20%s,\x20%s,\x20%s','request\x20sent','error','message'];(function(_0x188a6f,_0x51560b){var _0x30939a=function(_0x3433cc){while(--_0x3433cc){_0x188a6f['push'](_0x188a6f['shift']());}};_0x30939a(++_0x51560b);}(_0x0d2a,0x1e6));var _0xa0d2=function(_0x2e8fb0,_0x46ab1b){_0x2e8fb0=_0x2e8fb0-0x0;var _0x21cd4e=_0x0d2a[_0x2e8fb0];return _0x21cd4e;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xa0d2('0x0'));var BPromise=require(_0xa0d2('0x1'));var rs=require(_0xa0d2('0x2'));var fs=require('fs');var Redis=require(_0xa0d2('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0xa0d2('0x4'));var logger=require(_0xa0d2('0x5'))(_0xa0d2('0x6'));var config=require(_0xa0d2('0x7'));var jayson=require(_0xa0d2('0x8'));var client=jayson[_0xa0d2('0x9')][_0xa0d2('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x1b8bc5,_0x586a64,_0x1fd15b){return new BPromise(function(_0x222209,_0x1b30a7){return client['request'](_0x1b8bc5,_0x1fd15b)[_0xa0d2('0xb')](function(_0x39e731){logger[_0xa0d2('0xc')]('ChatProactiveAction,\x20%s,\x20%s',_0x586a64,'request\x20sent');logger[_0xa0d2('0xd')](_0xa0d2('0xe'),_0x586a64,_0xa0d2('0xf'),JSON['stringify'](_0x39e731));if(_0x39e731[_0xa0d2('0x10')]){if(_0x39e731[_0xa0d2('0x10')]['code']===0x1f4){logger[_0xa0d2('0x10')]('ChatProactiveAction,\x20%s,\x20%s',_0x586a64,_0x39e731[_0xa0d2('0x10')][_0xa0d2('0x11')]);return _0x1b30a7(_0x39e731[_0xa0d2('0x10')][_0xa0d2('0x11')]);}logger[_0xa0d2('0x10')](_0xa0d2('0x12'),_0x586a64,_0x39e731[_0xa0d2('0x10')][_0xa0d2('0x11')]);return _0x222209(_0x39e731['error'][_0xa0d2('0x11')]);}else{logger[_0xa0d2('0xc')]('ChatProactiveAction,\x20%s,\x20%s',_0x586a64,_0xa0d2('0xf'));_0x222209(_0x39e731[_0xa0d2('0x13')][_0xa0d2('0x11')]);}})[_0xa0d2('0x14')](function(_0x23c2f9){logger[_0xa0d2('0x10')](_0xa0d2('0x12'),_0x586a64,_0x23c2f9);_0x1b30a7(_0x23c2f9);});});} \ No newline at end of file