perf: cname记录支持批量导入和导出

This commit is contained in:
xiaojunnuo
2026-01-22 10:56:45 +08:00
parent a97cee84f3
commit 607afe864a
10 changed files with 166 additions and 9 deletions
@@ -350,9 +350,9 @@ export class DomainService extends BaseService<DomainEntity> {
const getDomainPage = async (pager: Pager) => {
const pageRes = await this.page({
query: query,
buildQuery(bq) {
bq.andWhere(" (expiration_date is null or expiration_date < :now) ", { now: dayjs().add(1, 'month').valueOf() })
},
// buildQuery(bq) {
// bq.andWhere(" (expiration_date is null or expiration_date < :now) ", { now: dayjs().add(1, 'month').valueOf() })
// },
page: {
offset: pager.getOffset(),
limit: pager.pageSize,
@@ -9,7 +9,7 @@ export class BackTaskExecutor {
}
const oldTask = this.tasks[type][task.key]
if (oldTask && oldTask.status === "running") {
throw new Error(`任务 ${task.key} 正在运行中`)
throw new Error(`任务 ${type}${task.key} 正在运行中`)
}
this.tasks[type][task.key] = task
this.run(type, task);
@@ -39,7 +39,7 @@ export class BackTaskExecutor {
private async run(type: string, task: any) {
if (task.status === "running") {
throw new Error(`任务 ${task.key} 正在运行中`)
throw new Error(`任务 ${type}${task.key} 正在运行中`)
}
task.startTime = Date.now();
task.clearTimeout();
@@ -47,7 +47,7 @@ export class BackTaskExecutor {
task.status = "running";
return await task.run(task);
} catch (e) {
logger.error(`任务 ${task.title}[${task.key}] 执行失败`, e.message);
logger.error(`任务 ${task.title}[${type}-${task.key}] 执行失败`, e.message);
task.status = "failed";
task.error = e.message;
} finally {