hackclub / bag

A Slack based RPG system!
https://bag.hackclub.com
8 stars 2 forks source link

[BUG] softlocks in /use #28

Open rivques opened 5 months ago

rivques commented 5 months ago

Occasionally, because of call stack shenanigans, the callback that updates an ActionInstance to done: true after a user runs /use doesn't run. This results in a softlock of the user doing the action. The solution to this is probably to add a start_time column to the ActionInstance table, then occasionally trawl the database for ActionInstances with done='false' and start_time longer ago than some long time.

rivques commented 5 months ago

This might not actually be due to setTimeout. There's an intermittent issue where trying to cancel someone else's action will softlock them. Might have something to do with Slack not sending something ethereally and updating the action msg instead? More discussion in this thread.