Open-Assistant icon indicating copy to clipboard operation
Open-Assistant copied to clipboard

Stop users from starting more than one task at a time

Open AlexanderHott opened this issue 2 years ago • 1 comments

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 avatar Jan 02 '23 08:01 AlexanderHott

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.

yk avatar Jan 02 '23 10:01 yk

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 avatar Jan 02 '23 20:01 AlexanderHott