mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core: also disable smtp if smtp.user doesn't exist
This commit is contained in:
1 parent
bc4d424abf
commit
cd4ada0845
3 files changed
+3
-3
No files matched your search
@@ -116,7 +116,7 @@ class TaskModel {
|
||||
|
||||
static getFirst = getFirst;
|
||||
|
||||
static async getDelay(query?: FilterQuery<Task>) {
|
||||
static async getDelay(query?: FilterQuery<Task>): Promise<[number, Date]> {
|
||||
const now = new Date();
|
||||
const res = await coll.findOne(query, { sort: { executeAfter: 1 } });
|
||||
if (res) return [Math.max(0, now.getTime() - res.executeAfter.getTime()), res.executeAfter];
|
||||
|
||||
Reference in new issue
Block a user