CarsonHoffman / office-hours-queue

11 stars 7 forks source link

Add option to automatically activate cooldown feature when queue reaches specified size #38

Closed santiagomed closed 1 year ago

santiagomed commented 1 year ago

When the queue is really long, the cooldown feature becomes redundant since students would still have to wait hours to be helped again. It is most useful when there is a very small amount of students in the queue.

It would be great if an additional setting is implemented, which specifies a size n, and the cooldown feature will activate only when the number of students is < n.

Along the same lines, switching the cooldown time measurement to minutes from seconds would be appreciated!

Thanks in advance!

CarsonHoffman commented 1 year ago

I don't think that adding a special case for queue size is appropriate here—complexity will start to balloon. This is only one of a ton of other possible qualifiers one might want on the activation of a rule like this one, and without a more structural solution I don't want to patch on additional conditions.

I think seconds is an appropriate granularity. A course might want to use this simply to stop someone spamming the button, and therefore only needs a cooldown less than a minute. The UI still displays to students as minutes when it's over 60 seconds.

santiagomed commented 1 year ago

Makes sense. Thanks for the response!