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

Fix slack channels sync #2571

Merged
merged 7 commits into from
Jul 19, 2023
Merged

Fix slack channels sync #2571

merged 7 commits into from
Jul 19, 2023

Conversation

Ferril
Copy link
Member

@Ferril Ferril commented Jul 18, 2023

What this PR does

  • Fixes issue with slack channels sync periodic tasks when we get slack rate limit exception.
  • Adds check for active task id to avoid starting multiple tasks for one slack team.

Collecting channels for slack for some teams causes rate limit exception, which causes the task to restart and start collecting slack channels from the beginning. This PR adds new paginated api call and refactors the slack channel sync task to continue collect data after rate limit from the step before it was raised using cursor value from the slack response.

Checklist

  • Unit, integration, and e2e (if applicable) tests updated
  • Documentation added (or pr:no public docs PR label added if not required)
  • CHANGELOG.md updated (or pr:no changelog PR label added if not required)

@Ferril Ferril requested a review from a team July 18, 2023 14:24
@Ferril Ferril added the pr:no public docs Added to a PR that does not require public documentation updates label Jul 18, 2023
engine/apps/slack/tasks.py Show resolved Hide resolved
@Ferril Ferril force-pushed the fix-slack-channels-sync branch from 7931527 to d723acd Compare July 19, 2023 07:03
@joeyorlando joeyorlando enabled auto-merge July 19, 2023 07:13
@joeyorlando joeyorlando added this pull request to the merge queue Jul 19, 2023
Merged via the queue into dev with commit adfb496 Jul 19, 2023
@joeyorlando joeyorlando deleted the fix-slack-channels-sync branch July 19, 2023 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:no public docs Added to a PR that does not require public documentation updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants