feat: complete workflow recovery and safe administration
This commit is contained in:
1 parent
1148aa6f14
commit
69583e8c33
46 files changed
+756
-120
No files matched your search
@@ -76,7 +76,7 @@ class StorageService{
|
||||
archive(id,jobId,directory='',actor='自动归档'){
|
||||
return this.run(id,async (server,signal)=>{
|
||||
segments(directory);if(typeof jobId!=='string'||!jobId||jobId.length>200)throw fail('请选择已完成的 PDF 导出任务。');
|
||||
const job=this.jobs.jobs().find(j=>j.jobId===jobId);if(!job||job.status!=='success'||typeof job.path!=='string')throw fail('请选择已完成且存在的 PDF。');
|
||||
const job=this.jobs.job?this.jobs.job(jobId):this.jobs.jobs().find(j=>j.jobId===jobId);if(!job||job.status!=='success'||typeof job.path!=='string')throw fail('请选择已完成且存在的 PDF。');
|
||||
const record=this.store.beginArchive(id,jobId,actor,directory);
|
||||
try{
|
||||
const [root,file]=await Promise.all([fs.realpath(this.outputDir),fs.realpath(job.path)]);
|
||||
|
||||
Reference in new issue
Block a user