Skip to content

Commit

Permalink
feat: refactor socket.io emit and middlewares, support session
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamerblue committed Aug 5, 2024
1 parent 4c37a93 commit 5b6f30e
Show file tree
Hide file tree
Showing 21 changed files with 606 additions and 189 deletions.
94 changes: 44 additions & 50 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"dev-w2": "cross-env NODE_ENV=development DEBUG=oj3:*,simple-git,egg-socket.io* midway-bin dev --ts --workers=2",
"devtest": "cross-env TS_NODE_PROJECT=test/tsconfig.json NODE_ENV=test DEBUG=-* midway-bin test --ts",
"dev-socket-io": "cd src/sub-app/socket-io && npm run dev",
"debug-socket-io": "cd src/sub-app/socket-io && npm run debug",
"lint": "eslint --fix {src,test}/**/*.ts",
"start-build": "npm run build && cross-env NODE_ENV=development midway-bin dev",
"start": "egg-scripts start --daemon --title=egg-server-onlinejudge3-be --framework=midway --ts --ignore-stderr",
Expand Down Expand Up @@ -46,6 +47,7 @@
"egg-scripts": "^2.10.0",
"egg-security": "^2.11.0",
"egg-sequelize": "^5.2.1",
"egg-session": "^3.3.0",
"egg-session-redis": "^2.1.0",
"egg-socket.io": "^4.1.6",
"fflate": "^0.8.2",
Expand Down
2 changes: 1 addition & 1 deletion src/config/judger.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const judgerConfig: IJudgerConfig = {
dataGitEmail: 'sdutacm@example.com',
/** 评测机地址 */
address: 'ipv4:127.0.0.1:4003',
socketBridgeBaseUrl: 'http://127.0.0.1:7002/socketBridge',
socketBridgeBaseUrl: 'http://127.0.0.1:7002/socketBridge/emit',
socketBridgeEmitAuthKey: '',
mqJudgeQueueTopic: 'judge-queue',
mqJudgeQueueSubscription: 'judge-subscription',
Expand Down
Loading

0 comments on commit 5b6f30e

Please sign in to comment.