-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Currently we are spawning a goroutine for each request that is done in the curfew hours. There are following issues with this:
- These goroutines can be very long lived (upto a week). Such thing can lead to quick resource exhaustion in a busy app since we might be spawning more goroutines than we are completing.
- The scheduled goroutines live in memory so this will not survive the server restarts.
- There is no retry mechanism for the failed or timed out tries for the status updates.
Possible Solution
- store the info to change the status in the sqlite db with reasonable
busy-timeout. - have a goroutine polling the sqlite for the scheduled events in the last interval and tries to change the status one by one.
- mark the entry in database successful or unsuccessful depending on the status change.
- optionally implement the retry mechanism for the failed status updates. (future TODO)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request