chore(*): remove unused code (#6781)

The code removed in the PR was flagged as unused by the JetBrains
inspector.

I did a QA on the dev environment but other checks are highly
recommended.

There is one commit by scope to make the review easier.

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Antoine Moreaux
2024-08-29 18:16:50 +02:00
committed by GitHub
parent ebfdc6cfd2
commit cd06ae20e8
86 changed files with 97 additions and 575 deletions

View File

@ -1 +0,0 @@
export const CALENDAR_THROTTLE_DURATION = 1000 * 60 * 1; // 1 minute

View File

@ -109,18 +109,6 @@ export class CalendarChannelSyncStatusService {
});
}
public async markAsCalendarEventsImportOngoing(calendarChannelId: string) {
const calendarChannelRepository =
await this.twentyORMManager.getRepository<CalendarChannelWorkspaceEntity>(
'calendarChannel',
);
await calendarChannelRepository.update(calendarChannelId, {
syncStage: CalendarChannelSyncStage.CALENDAR_EVENTS_IMPORT_ONGOING,
syncStatus: CalendarChannelSyncStatus.ONGOING,
});
}
public async markAsCompletedAndSchedulePartialMessageListFetch(
calendarChannelId: string,
) {

View File

@ -26,31 +26,3 @@ export const valuesStringForBatchRawQuery = (
return castedValues.join(', ');
};
export const getFlattenedValuesAndValuesStringForBatchRawQuery = (
values: {
[key: string]: any;
}[],
keyTypeMap: {
[key: string]: string;
},
): {
flattenedValues: any[];
valuesString: string;
} => {
const keysToInsert = Object.keys(keyTypeMap);
const flattenedValues = values.flatMap((value) =>
keysToInsert.map((key) => value[key]),
);
const valuesString = valuesStringForBatchRawQuery(
values,
Object.values(keyTypeMap),
);
return {
flattenedValues,
valuesString,
};
};