🎈 perf(dispatch): 路由使用redis
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import { STATUS } from './../../../consts/statusCode';
|
||||
import { dispatch } from '../../../util/dispatcher';
|
||||
import { dispatch } from '../../../pubUtils/dispatcher';
|
||||
import { Application, BackendSession, HandlerService, pinus, } from 'pinus';
|
||||
import { resResult } from '../../../pubUtils/util';
|
||||
import { redisClient } from '../../../services/redisService';
|
||||
|
||||
export default function (app: Application) {
|
||||
new HandlerService(app, {});
|
||||
@@ -31,7 +32,7 @@ export class GateHandler {
|
||||
return resResult(STATUS.CONNECTOR_ERR);
|
||||
}
|
||||
// select connector
|
||||
let res = dispatch(userCode, connectors, 'connector');
|
||||
let res = await dispatch(redisClient(), userCode, connectors, 'connector');
|
||||
return resResult(STATUS.SUCCESS, { host: res.clientHost, port: res.clientPort });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user