staging #462

Merged
edraft merged 35 commits from staging into master 2023-12-17 01:03:15 +01:00
5 changed files with 6 additions and 6 deletions
Showing only changes of commit 39299eb11b - Show all commits

View File

@ -62,8 +62,8 @@ class BaseModule(ModuleABC):
services.add_transient(BaseReactionHandler)
services.add_singleton(EventService)
services.add_transient(UserWarningsService)
services.add_singleton(TaskABC, BirthdayWatcher)
services.add_singleton(TaskABC, ScheduledEventsWatcher)
services.add_transient(TaskABC, BirthdayWatcher)
services.add_transient(TaskABC, ScheduledEventsWatcher)
# forms
services.add_transient(BugReportForm)

View File

@ -37,7 +37,7 @@ class BirthdayWatcher(TaskABC):
if not self._is_maintenance():
self.watch.start()
@tasks.loop(time=datetime.time(hour=8, minute=0))
@tasks.loop(time=datetime.time(hour=8, minute=0), reconnect=True)
async def watch(self):
self._logger.info(__name__, "Watching birthdays")
try:

View File

@ -37,7 +37,7 @@ class ScheduledEventsWatcher(TaskABC):
if not self._is_maintenance():
self.watch.start()
@tasks.loop(hours=3)
@tasks.loop(hours=3, reconnect=True)
async def watch(self):
self._logger.info(__name__, "Watching scheduled events")
try:

View File

@ -17,6 +17,6 @@ class SteamSpecialOffersModule(ModuleABC):
pass
def configure_services(self, services: ServiceCollectionABC, env: ApplicationEnvironmentABC):
services.add_singleton(TaskABC, SteamOfferWatcher)
services.add_transient(TaskABC, SteamOfferWatcher)
# commands
# events

View File

@ -187,7 +187,7 @@ class SteamOfferWatcher(TaskABC):
self._logger.trace(__name__, "Finished watching")
return offers_for_notifications
@tasks.loop(hours=4)
@tasks.loop(hours=4, reconnect=True)
async def watch(self):
self._logger.info(__name__, "Watching steam special offers")
try: