diff --git a/backend/src/worker.module.ts b/backend/src/worker.module.ts index 33756dd..e4a572f 100644 --- a/backend/src/worker.module.ts +++ b/backend/src/worker.module.ts @@ -3,11 +3,17 @@ import { ConfigModule, ConfigService } from '@nestjs/config'; import { TypeOrmModule } from '@nestjs/typeorm'; import configuration from './config/configuration'; import { RedisModule } from './common/redis/redis.module'; +import { I18nModule } from './common/i18n/i18n.module'; +import { CacheModule } from './common/cache/cache.module'; import { LocationsModule } from './modules/locations/locations.module'; /** * وحدة الـworker — عملية منفصلة (`node dist/worker.js`) لا تخدم HTTP. * تحمل ما يحتاجه العمل الدوري فقط: قاعدة + Redis + المواقع. + * + * جذر تجميع ثانٍ مستقل عن AppModule: الوحدات `@Global` تُسجَّل فقط إن + * استوردها أحدٌ في الشجرة، فما يسجّله AppModule لا يصل إلى هنا مجّاناً. + * المواقع تجرّ الجيوفنس ← الإشعارات ← i18n + cache (وعبر المستخدمين أيضاً). */ @Module({ imports: [ @@ -29,6 +35,8 @@ import { LocationsModule } from './modules/locations/locations.module'; }), }), RedisModule, + I18nModule, // عالمي — نصوص إشعارات الجيوفنس + CacheModule, // عالمي — يحقنه UsersService خلف الإشعارات LocationsModule, ], })