mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 06:46:09 +08:00
修复订阅任务创建逻辑
This commit is contained in:
parent
4f925b92d0
commit
026fc43695
|
@ -26,6 +26,11 @@ export default async () => {
|
|||
// 运行所有订阅
|
||||
const subs = await subscriptionService.list();
|
||||
for (const sub of subs) {
|
||||
await subscriptionService.handleTask(sub, true, true, true);
|
||||
await subscriptionService.handleTask(
|
||||
sub,
|
||||
!sub.is_disabled,
|
||||
true,
|
||||
!sub.is_disabled,
|
||||
);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -286,7 +286,7 @@ export default class SubscriptionService {
|
|||
|
||||
public async update(payload: Subscription): Promise<Subscription> {
|
||||
const newDoc = await this.updateDb(payload);
|
||||
await this.handleTask(newDoc);
|
||||
await this.handleTask(newDoc, !newDoc.is_disabled);
|
||||
return newDoc;
|
||||
}
|
||||
|
||||
|
@ -360,7 +360,6 @@ export default class SubscriptionService {
|
|||
this.logger.silly(error);
|
||||
}
|
||||
}
|
||||
await this.handleTask(doc, false);
|
||||
const command = this.formatCommand(doc);
|
||||
const err = await this.killTask(command);
|
||||
const absolutePath = await this.handleLogPath(doc.log_path as string);
|
||||
|
|
Loading…
Reference in New Issue
Block a user