mirror of
https://github.com/docmost/docmost.git
synced 2026-05-20 16:44:05 +08:00
fix
This commit is contained in:
@@ -18,6 +18,7 @@ export interface ConfluenceApiImports {
|
||||
warnings: Generated<Json>;
|
||||
currentPhase: string | null;
|
||||
cancelled: Generated<boolean>;
|
||||
spaceKeys: Generated<Json>;
|
||||
workspaceId: string;
|
||||
creatorId: string | null;
|
||||
createdAt: Generated<Timestamp>;
|
||||
|
||||
+1
-1
Submodule apps/server/src/ee updated: 7d1b155d5f...ae15159b8d
@@ -28,6 +28,9 @@ export class FileTaskProcessor extends WorkerHost implements OnModuleDestroy {
|
||||
case QueueJob.IMPORT_TASK:
|
||||
await this.fileTaskService.processZIpImport(job.data.fileTaskId);
|
||||
break;
|
||||
case QueueJob.CONFLUENCE_API_IMPORT:
|
||||
await this.processConfluenceApiImport(job.data.fileTaskId);
|
||||
break;
|
||||
case QueueJob.PDF_EXPORT_TASK:
|
||||
await this.processExportTask(job.data.fileTaskId);
|
||||
break;
|
||||
@@ -49,6 +52,19 @@ export class FileTaskProcessor extends WorkerHost implements OnModuleDestroy {
|
||||
});
|
||||
}
|
||||
|
||||
private getConfluenceApiImportService() {
|
||||
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||
const mod = require('./../../../ee/confluence-api-import/confluence-api-import.service');
|
||||
return this.moduleRef.get(mod.ConfluenceApiImportService, {
|
||||
strict: false,
|
||||
});
|
||||
}
|
||||
|
||||
private async processConfluenceApiImport(fileTaskId: string): Promise<void> {
|
||||
const service = this.getConfluenceApiImportService();
|
||||
await service.processImport(fileTaskId);
|
||||
}
|
||||
|
||||
private async processExportTask(fileTaskId: string): Promise<void> {
|
||||
const pdfExportService = this.getPdfExportService();
|
||||
await pdfExportService.generateAndStorePdf(fileTaskId);
|
||||
@@ -74,6 +90,8 @@ export class FileTaskProcessor extends WorkerHost implements OnModuleDestroy {
|
||||
await this.handleFailedImportJob(job);
|
||||
} else if (job.name === QueueJob.PDF_EXPORT_TASK) {
|
||||
await this.handleFailedExportJob(job);
|
||||
} else if (job.name === QueueJob.CONFLUENCE_API_IMPORT) {
|
||||
await this.handleFailedExportJob(job);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ export enum QueueJob {
|
||||
FIRST_PAYMENT_EMAIL = 'first-payment-email',
|
||||
|
||||
IMPORT_TASK = 'import-task',
|
||||
CONFLUENCE_API_IMPORT = 'confluence-api-import-task',
|
||||
EXPORT_TASK = 'export-task',
|
||||
|
||||
SEARCH_INDEX_PAGE = 'search-index-page',
|
||||
|
||||
Reference in New Issue
Block a user