mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
vjudge: check first-daemon
This commit is contained in:
1 parent
59d4bcf620
commit
e042cef4fa
2 files changed
+3
-1
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/vjudge",
|
||||
"version": "1.2.1",
|
||||
"version": "1.2.2",
|
||||
"description": "Submit problems to remote oj",
|
||||
"main": "package.json",
|
||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||
|
||||
@@ -90,6 +90,8 @@ class Service {
|
||||
}
|
||||
|
||||
async function loadAccounts() {
|
||||
// Only start a single daemon
|
||||
if (!global.Hydro.isFirstWorker) return;
|
||||
const accounts = await coll.find().toArray();
|
||||
for (const account of accounts) {
|
||||
if (!providers[account.type]) continue;
|
||||
|
||||
Reference in new issue
Block a user