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:
@ -1 +0,0 @@
|
||||
export const CALENDAR_THROTTLE_DURATION = 1000 * 60 * 1; // 1 minute
|
||||
@ -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,
|
||||
) {
|
||||
|
||||
@ -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,
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user