|
@@ -13,7 +13,7 @@ import pkg from '^/package.json';
|
|
|
import { KeycloakUserGroupSyncService } from '~/features/external-user-group/server/service/keycloak-user-group-sync';
|
|
import { KeycloakUserGroupSyncService } from '~/features/external-user-group/server/service/keycloak-user-group-sync';
|
|
|
import { LdapUserGroupSyncService } from '~/features/external-user-group/server/service/ldap-user-group-sync';
|
|
import { LdapUserGroupSyncService } from '~/features/external-user-group/server/service/ldap-user-group-sync';
|
|
|
import { startCronIfEnabled as startOpenaiCronIfEnabled } from '~/features/openai/server/services/cron';
|
|
import { startCronIfEnabled as startOpenaiCronIfEnabled } from '~/features/openai/server/services/cron';
|
|
|
-import { PageBulkExportJobInProgressStatus } from '~/features/page-bulk-export/interfaces/page-bulk-export';
|
|
|
|
|
|
|
+import { PageBulkExportEnabledServiceTypes, PageBulkExportJobInProgressStatus } from '~/features/page-bulk-export/interfaces/page-bulk-export';
|
|
|
import PageBulkExportJob from '~/features/page-bulk-export/server/models/page-bulk-export-job';
|
|
import PageBulkExportJob from '~/features/page-bulk-export/server/models/page-bulk-export-job';
|
|
|
import { checkPageBulkExportJobInProgressCronService } from '~/features/page-bulk-export/server/service/check-page-bulk-export-job-in-progress-cron';
|
|
import { checkPageBulkExportJobInProgressCronService } from '~/features/page-bulk-export/server/service/check-page-bulk-export-job-in-progress-cron';
|
|
|
import instanciatePageBulkExportService, { pageBulkExportService } from '~/features/page-bulk-export/server/service/page-bulk-export';
|
|
import instanciatePageBulkExportService, { pageBulkExportService } from '~/features/page-bulk-export/server/service/page-bulk-export';
|
|
@@ -333,11 +333,14 @@ Crowi.prototype.setupSocketIoService = async function() {
|
|
|
Crowi.prototype.setupCron = function() {
|
|
Crowi.prototype.setupCron = function() {
|
|
|
questionnaireCronService.startCron();
|
|
questionnaireCronService.startCron();
|
|
|
|
|
|
|
|
- instanciatePageBulkExportJobCronService(this);
|
|
|
|
|
- checkPageBulkExportJobInProgressCronService.startCron();
|
|
|
|
|
|
|
+ const isPageBulkExportEnabled = PageBulkExportEnabledServiceTypes.includes(this.configManager.getConfig('crowi', 'app:serviceType'));
|
|
|
|
|
+ if (isPageBulkExportEnabled) {
|
|
|
|
|
+ instanciatePageBulkExportJobCronService(this);
|
|
|
|
|
+ checkPageBulkExportJobInProgressCronService.startCron();
|
|
|
|
|
|
|
|
- instanciatePageBulkExportJobCleanUpCronService(this);
|
|
|
|
|
- pageBulkExportJobCleanUpCronService.startCron();
|
|
|
|
|
|
|
+ instanciatePageBulkExportJobCleanUpCronService(this);
|
|
|
|
|
+ pageBulkExportJobCleanUpCronService.startCron();
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
startOpenaiCronIfEnabled();
|
|
startOpenaiCronIfEnabled();
|
|
|
};
|
|
};
|