Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: update timestamp only when no unsuccessful updates #24

Merged
merged 1 commit into from
Dec 12, 2023

Conversation

bharati-21
Copy link
Contributor

Date: 9th December 2023

Developer Name: @bharati-21


Issue Ticket Number:-

Real-Dev-Squad/website-backend#1755

Description:

  • The last nickname updated timestamp should only be updated when there are no failures for nickname updates and all the users' discord nickname was updated successfully.

Is Under Feature Flag

  • Yes
  • No

Database changes

  • Yes
  • No

Breaking changes (If your feature is breaking/missing something please mention pending tickets)

  • Yes
  • No

Is Development Tested?

  • Yes
  • No

Add relevant Screenshot below ( e.g test coverage etc. )

Comment on lines +53 to +58
if (data?.data.unsuccessfulNicknameUpdates === 0) {
try {
await namespace.put('DISCORD_NICKNAME_UPDATED_TIME', Date.now().toString());
} catch (err) {
console.error('Error while trying to update the last nickname change timestamp');
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also track the failed updates based on Id, and store them it another KV, then try again for the failed ones?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be taken up in different issue, while exploring other viable options.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then please create the issues and add the link here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@prakashchoudhary07 prakashchoudhary07 merged commit 94cbd5c into develop Dec 12, 2023
1 check passed
@prakashchoudhary07 prakashchoudhary07 deleted the Fix/1749-select-RDS-active-users branch December 12, 2023 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants