修复下载单文件订阅

This commit is contained in:
whyour committed 2024-06-06 22:40:51 +08:00
1 parent 1e749f3731
commit c3908e956f
9 files changed
+46 -25

No files matched your search

+5 -2
View File
@@ -375,7 +375,10 @@ export default class CronService {
public async getDb(query: FindOptions<Crontab>['where']): Promise<Crontab> {
const doc: any = await CrontabModel.findOne({ where: { ...query } });
return doc && (doc.get({ plain: true }) as Crontab);
if (!doc) {
throw new Error(`${JSON.stringify(query)} not found`);
}
return doc.get({ plain: true });
}
public async run(ids: number[]) {
@@ -437,7 +440,7 @@ export default class CronService {
const cp = spawn(
`real_log_path=${logPath} no_delay=true ${this.makeCommand(
cron,
true
true,
)}`,
{ shell: '/bin/bash' },
);