jporter-dev / codewords

162 stars 39 forks source link

Remove old rooms after a period of inactivity #28

Closed jporter-dev closed 4 years ago

jporter-dev commented 5 years ago

Related to #5 - old rooms should be scanned and removed upon new room creation. This is a stopgap solution to using a semi-persistent storage as mentioned in related issue.

jporter-dev commented 4 years ago

This is implemented in the prune method. Currently prunes stale games every time a new game is created. Stale games are either6 hours old or 20 minutes old with less than 5 minutes of playtime (these are likely games people created just to see how it works).

The stale game calculation is still being fine-tuned, it's possible we could let games persist a bit longer.