mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
judge: priority control
This commit is contained in:
1 parent
234f977e08
commit
22298540f3
2 files changed
+2
-2
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hydrooj",
|
"name": "hydrooj",
|
||||||
"version": "3.2.20",
|
"version": "3.2.21",
|
||||||
"bin": "bin/hydrooj.js",
|
"bin": "bin/hydrooj.js",
|
||||||
"main": "src/loader",
|
"main": "src/loader",
|
||||||
"module": "src/loader",
|
"module": "src/loader",
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class RecordModel {
|
|||||||
const pending = await task.count({ uid });
|
const pending = await task.count({ uid });
|
||||||
const timeRecent = await RecordModel.coll
|
const timeRecent = await RecordModel.coll
|
||||||
.find({ _id: { $gte: Time.getObjectID(moment().add(-1, 'hour')) }, uid }).project({ time: 1 }).toArray();
|
.find({ _id: { $gte: Time.getObjectID(moment().add(-1, 'hour')) }, uid }).project({ time: 1 }).toArray();
|
||||||
return base - ((pending + 0.5) * (sum(timeRecent.map((i) => i.time || 0)) / 10000));
|
return base - ((pending * 100 + 1) * (sum(timeRecent.map((i) => i.time || 0)) / 10000));
|
||||||
}
|
}
|
||||||
|
|
||||||
static async get(_id: ObjectID): Promise<RecordDoc | null>
|
static async get(_id: ObjectID): Promise<RecordDoc | null>
|
||||||
|
|||||||
Reference in new issue
Block a user