Improve throttling of profile fetching
This commit is contained in:
parent
92ca681d3a
commit
22acb57078
1 changed files with 2 additions and 0 deletions
|
@ -329,6 +329,7 @@ async function doGetProfile(c: ConversationModel): Promise<void> {
|
|||
}
|
||||
|
||||
if (error.code === 404) {
|
||||
c.set('profileLastFetchedAt', Date.now());
|
||||
await c.removeLastProfile(lastProfile);
|
||||
}
|
||||
|
||||
|
@ -344,6 +345,7 @@ async function doGetProfile(c: ConversationModel): Promise<void> {
|
|||
if (error instanceof HTTPError && error.code === 404) {
|
||||
log.info(`getProfile: failed to find a profile for ${idForLogging}`);
|
||||
|
||||
c.set('profileLastFetchedAt', Date.now());
|
||||
await c.removeLastProfile(lastProfile);
|
||||
if (!isVersioned) {
|
||||
log.info(`getProfile: marking ${idForLogging} as unregistered`);
|
||||
|
|
Loading…
Add table
Reference in a new issue