Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/ten-bobcats-occur.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': patch
---

Fixed an issue where the sync ldap avatars background process would never run
3 changes: 2 additions & 1 deletion apps/meteor/ee/server/configuration/ldap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ Meteor.startup(async () => {
return;
}

const schedule = ldapIntervalValuesToCronMap[settings.get<string>(intervalSetting)];
const settingValue = settings.get<string>(intervalSetting);
const schedule = ldapIntervalValuesToCronMap[settingValue] ?? settingValue;
if (schedule) {
if (schedule !== lastSchedule && (await cronJobs.has(jobName))) {
await cronJobs.remove(jobName);
Expand Down
6 changes: 3 additions & 3 deletions apps/meteor/ee/server/settings/ldap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ export function addSettings(): Promise<void> {
invalidValue: false,
});

await this.add('LDAP_Background_Sync_Avatars_Interval', 'Every 24 hours', {
await this.add('LDAP_Background_Sync_Avatars_Interval', '0 0 * * *', {
type: 'string',
enableQuery: [enableQuery, { _id: 'LDAP_Background_Sync_Avatars', value: true }],
invalidValue: 'Every 24 hours',
invalidValue: '0 0 * * *',
});
});

Expand Down Expand Up @@ -118,7 +118,7 @@ export function addSettings(): Promise<void> {
invalidValue: false,
});

await this.add('LDAP_Sync_AutoLogout_Interval', 'Every 5 minutes', {
await this.add('LDAP_Sync_AutoLogout_Interval', '*/5 * * * *', {
type: 'string',
enableQuery: [enableQuery, { _id: 'LDAP_Sync_AutoLogout_Enabled', value: true }],
invalidValue: '',
Expand Down