Fix broken sync-metadata (#5154)
An error has been recently introduced in the sync of fieldMetadata. This PR fixes it Additionnally, we are enabling email for trialing and past_due workspaces. There is an ongoing work to introduce a more robust activationStatus on workspace.
This commit is contained in:
@ -140,7 +140,7 @@ export class WorkspaceMetadataUpdaterService {
|
|||||||
*/
|
*/
|
||||||
const updatedFieldMetadataCollection = await this.updateEntities<
|
const updatedFieldMetadataCollection = await this.updateEntities<
|
||||||
FieldMetadataEntity<'default'>
|
FieldMetadataEntity<'default'>
|
||||||
>(manager, FieldMetadataEntity, storage.objectMetadataUpdateCollection, [
|
>(manager, FieldMetadataEntity, storage.fieldMetadataUpdateCollection, [
|
||||||
'objectMetadataId',
|
'objectMetadataId',
|
||||||
'workspaceId',
|
'workspaceId',
|
||||||
]);
|
]);
|
||||||
@ -241,7 +241,7 @@ export class WorkspaceMetadataUpdaterService {
|
|||||||
manager: EntityManager,
|
manager: EntityManager,
|
||||||
entityClass: EntityTarget<Entity>,
|
entityClass: EntityTarget<Entity>,
|
||||||
updateCollection: Array<
|
updateCollection: Array<
|
||||||
DeepPartial<Omit<Entity, 'fields'>> & { id: string }
|
DeepPartial<Omit<Entity, 'fields' | 'options'>> & { id: string }
|
||||||
>,
|
>,
|
||||||
keysToOmit: (keyof Entity)[] = [],
|
keysToOmit: (keyof Entity)[] = [],
|
||||||
): Promise<{ current: Entity; altered: Entity }[]> {
|
): Promise<{ current: Entity; altered: Entity }[]> {
|
||||||
|
|||||||
@ -29,7 +29,7 @@ export class GoogleCalendarSyncCronJob implements MessageQueueJob<undefined> {
|
|||||||
const workspaceIds = (
|
const workspaceIds = (
|
||||||
await this.workspaceRepository.find({
|
await this.workspaceRepository.find({
|
||||||
where: {
|
where: {
|
||||||
subscriptionStatus: 'active',
|
subscriptionStatus: In(['active', 'trialing', 'past_due']),
|
||||||
},
|
},
|
||||||
select: ['id'],
|
select: ['id'],
|
||||||
})
|
})
|
||||||
|
|||||||
@ -30,7 +30,7 @@ export class GmailFetchMessagesFromCacheCronJob
|
|||||||
const workspaceIds = (
|
const workspaceIds = (
|
||||||
await this.workspaceRepository.find({
|
await this.workspaceRepository.find({
|
||||||
where: {
|
where: {
|
||||||
subscriptionStatus: 'active',
|
subscriptionStatus: In(['active', 'trialing', 'past_due']),
|
||||||
},
|
},
|
||||||
select: ['id'],
|
select: ['id'],
|
||||||
})
|
})
|
||||||
|
|||||||
@ -36,7 +36,7 @@ export class GmailPartialSyncCronJob implements MessageQueueJob<undefined> {
|
|||||||
const workspaceIds = (
|
const workspaceIds = (
|
||||||
await this.workspaceRepository.find({
|
await this.workspaceRepository.find({
|
||||||
where: {
|
where: {
|
||||||
subscriptionStatus: 'active',
|
subscriptionStatus: In(['active', 'trialing', 'past_due']),
|
||||||
},
|
},
|
||||||
select: ['id'],
|
select: ['id'],
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user