-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR introduces a new folder structure for business modules. Cron commands and jobs are now stored within the same module/folder at the root of the business module e.g: /modules/messaging/crons/commands instead of /modules/messaging/commands/crons Patterns are now inside their own cron-command files since they don't need to be exported Ideally cronJobs and cronCommands should have their logic within the same class but it's a bit harder than expected due to how commanderjs and our worker need both some class heritage check, hence the first approach is to move them in the same folder Also Messaging fullsync/partialsync V2 has been dropped since this is the only used version => Breaking change for ongoing jobs and crons. Jobs can be dropped but we will need to re-run our crons (only cron:messaging:gmail-fetch-messages-from-cache)
- Loading branch information
Showing
18 changed files
with
128 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 8 additions & 5 deletions
13
...orkspace-calendar-sync-commands.module.ts → ...ndar/commands/calendar-commands.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
import { Module } from '@nestjs/common'; | ||
|
||
import { GoogleCalendarSyncCommand } from 'src/modules/calendar/commands/google-calendar-sync.command'; | ||
import { ObjectMetadataRepositoryModule } from 'src/engine/object-metadata-repository/object-metadata-repository.module'; | ||
import { GoogleCalendarSyncCommand } from 'src/modules/calendar/commands/google-calendar-sync.command'; | ||
import { CalendarChannelObjectMetadata } from 'src/modules/calendar/standard-objects/calendar-channel.object-metadata'; | ||
import { ConnectedAccountObjectMetadata } from 'src/modules/connected-account/standard-objects/connected-account.object-metadata'; | ||
import { StartGoogleCalendarSyncCronJobCommand } from 'src/modules/calendar/commands/start-google-calendar-sync.cron.command'; | ||
|
||
@Module({ | ||
imports: [ | ||
ObjectMetadataRepositoryModule.forFeature([ConnectedAccountObjectMetadata]), | ||
ObjectMetadataRepositoryModule.forFeature([ | ||
ConnectedAccountObjectMetadata, | ||
CalendarChannelObjectMetadata, | ||
]), | ||
], | ||
providers: [GoogleCalendarSyncCommand, StartGoogleCalendarSyncCronJobCommand], | ||
providers: [GoogleCalendarSyncCommand], | ||
}) | ||
export class WorkspaceCalendarSyncCommandsModule {} | ||
export class CalendarCommandsModule {} |
11 changes: 11 additions & 0 deletions
11
packages/twenty-server/src/modules/calendar/crons/commands/calendar-cron-commands.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { Module } from '@nestjs/common'; | ||
|
||
import { GoogleCalendarSyncCommand } from 'src/modules/calendar/commands/google-calendar-sync.command'; | ||
import { ObjectMetadataRepositoryModule } from 'src/engine/object-metadata-repository/object-metadata-repository.module'; | ||
import { ConnectedAccountObjectMetadata } from 'src/modules/connected-account/standard-objects/connected-account.object-metadata'; | ||
import { GoogleCalendarSyncCronCommand } from 'src/modules/calendar/crons/commands/google-calendar-sync.cron.command'; | ||
|
||
@Module({ | ||
providers: [GoogleCalendarSyncCronCommand], | ||
}) | ||
export class CalendarCronCommandsModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
1 change: 0 additions & 1 deletion
1
...wenty-server/src/modules/calendar/jobs/crons/pattern/google-calendar-sync.cron.pattern.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.