-
Notifications
You must be signed in to change notification settings - Fork 41
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
Add sleep between calls to add user to channels #124
Open
mickmister
wants to merge
4
commits into
master
Choose a base branch
from
sleep-add-user-to-channel
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hanzei 0/5 on if this should be done this way. Lots of cons come with this:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm in favour of doing it this way, as it should fix the issue out-of-the-box. A config setting seems cumbersome and confusing for admins.
This code only runs once per user, i.e. on their creation. Having a delay is justifiable. Even with 60 channels (!), that is just one minute of wait time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though I wonder if the user is pinged with a "ding" every second. I haven't actually seen this in action yet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dear Michael @mickmister and Ben @hanzei, thanks for providing this fix and your thoughts. I agree with the concerns, though. This wait-time as the only measure is rather unreliable. You can never guess an optimal wait-time for all cases. Sometimes you bother users with unexpected long wait-times, sometimes you bother them with duplicate categories.
Suggestions:
Is there a way to determine if a category needs to be created, but creation has not yet been triggered (this might be the tricky part), check if the category already exists, wait-retry if is it not yet created but triggered, add member if it is already created?
Is there a way to wait only if a category assignment is configured in the channel actions?
What do you think about these suggestions?
That's of course more challenging to implement, but you might have an idea how to achieve that. Thank you very much for taking these considerations into account!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mickmister Are you looking into this or we should?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hanzei Note that there is already a property on the
WelcomeMessage
struct calledDelayInSeconds
, which allows the admin to set a delay between certain operations, so introducing another part of the config with this pattern would not be out of the ordinary. 0/5 but in this case it may make sense to allow the admin to set this, so we don't have to revisit it if the wait we choose is not high enough.