Skip to content

Scheduled Closure For More Than a Day

Compare
Choose a tag to compare
@Taaku18 Taaku18 released this 19 Jan 00:28
· 1798 commits to master since this release
1fb5a64

Non-Breaking Internal Changes. (This shouldn't affect anyone.)

Background

Bots hosted by Heroku restart at least once every 27 hours.
During this period, local caches are deleted, which results in the inability to set the scheduled close time to longer than 24 hours. This update resolves this issue. PR #135

Changed

  • Created a new internal config var: closures.
  • Store closure details into closures when the scheduled time isn't "now".
    • Loaded upon bot restart.
    • Deleted when a thread is closed.
  • Use call_later() instead of sleep() for scheduling.