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

Stop users from starting more than one task at a time #265

Merged
merged 3 commits into from
Jan 2, 2023

Conversation

AlexanderHott
Copy link
Collaborator

The bot now keeps a set of user ID's for everyone currently doing a task. This gets removed after a user times out or doesn't want to do another task.

@AlexanderHott AlexanderHott mentioned this pull request Jan 2, 2023
14 tasks
@yk
Copy link
Collaborator

yk commented Jan 2, 2023

I don't have a good overview over what the code looks like, but could we store a map user -> task, so that at least internally we have an idea which task the user is working on? we could then log this internally when we yell at the user, and when there's a problem and a user says "hey it tells me I already have a task, but I don't", we can go and debug.

Copy link
Collaborator

@andreaskoepf andreaskoepf left a comment

Choose a reason for hiding this comment

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

ok, looks good.

@andreaskoepf andreaskoepf merged commit e15259b into LAION-AI:main Jan 2, 2023
@AlexanderHott
Copy link
Collaborator Author

I don't have a good overview over what the code looks like, but could we store a map user -> task, so that at least internally we have an idea which task the user is working on? we could then log this internally when we yell at the user, and when there's a problem and a user says "hey it tells me I already have a task, but I don't", we can go and debug.

We could use a weakref map from user id to task. Should we give the user an option to cancel their old task?

@AlexanderHott AlexanderHott deleted the fix/stop-multi-task branch January 4, 2023 03:23
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