File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import {
19
19
import { MongooseDatabaseConnection } from '@/infrastructure/database/connection' ;
20
20
import logger from '@/infrastructure/logger/logger' ;
21
21
import { Master } from '@/infrastructure/worker/master' ;
22
+ import { CacheService } from '@/services/cache/cache-service' ;
22
23
import { runCron } from '@/services/cron' ;
23
24
import { MigrationService } from '@/services/migration/migration' ;
24
25
import { SettingsService } from '@/services/settings/settings' ;
@@ -70,7 +71,14 @@ async function doPrimary() {
70
71
}
71
72
72
73
// Load settings into cache
73
- await getFromContainer ( SettingsService ) . getSettings ( ) ;
74
+ const settingsService = getFromContainer ( SettingsService ) ;
75
+ await settingsService . getSettings ( ) ;
76
+
77
+ // Create initial cache if it doesn't exist
78
+ logger . info ( 'Updating cache with common resources' ) ;
79
+ const cacheService = getFromContainer ( CacheService ) ;
80
+ await cacheService . getCommonResources ( ) ;
81
+ logger . info ( 'Cache finished updating' ) ;
74
82
75
83
logger . info ( `Petio v${ appConfig . version } [debug] [pid:${ PUID } ,gid:${ PGID } ]` ) ;
76
84
You can’t perform that action at this time.
0 commit comments