Add initializeRepositories to autoSyncInit.ts
This commit is contained in:
@@ -1,7 +1,22 @@
|
||||
import { AutoSyncService } from '~/server/services/autoSyncService';
|
||||
import { repositoryService } from '~/server/services/repositoryService';
|
||||
|
||||
let autoSyncService: AutoSyncService | null = null;
|
||||
|
||||
/**
|
||||
* Initialize default repositories
|
||||
*/
|
||||
export async function initializeRepositories(): Promise<void> {
|
||||
try {
|
||||
console.log('Initializing default repositories...');
|
||||
await repositoryService.initializeDefaultRepositories();
|
||||
console.log('Default repositories initialized successfully');
|
||||
} catch (error) {
|
||||
console.error('Failed to initialize repositories:', error);
|
||||
console.error('Error stack:', (error as Error).stack);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize auto-sync service and schedule cron job if enabled
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user