Fixed loop timer #410
This commit is contained in:
parent
bd856d0143
commit
5e9280d972
@ -7,7 +7,7 @@ from cpl_discord.service.discord_collection_abc import DiscordCollectionABC
|
|||||||
from bot_core.abc.module_abc import ModuleABC
|
from bot_core.abc.module_abc import ModuleABC
|
||||||
from bot_core.abc.task_abc import TaskABC
|
from bot_core.abc.task_abc import TaskABC
|
||||||
from bot_core.configuration.feature_flags_enum import FeatureFlagsEnum
|
from bot_core.configuration.feature_flags_enum import FeatureFlagsEnum
|
||||||
from modules.base.birthday_watcher import BirthdayWatcher
|
from modules.base.tasks.birthday_watcher import BirthdayWatcher
|
||||||
from modules.base.command.afk_command import AFKCommand
|
from modules.base.command.afk_command import AFKCommand
|
||||||
from modules.base.command.game_server_group import GameServerGroup
|
from modules.base.command.game_server_group import GameServerGroup
|
||||||
from modules.base.command.help_command import HelpCommand
|
from modules.base.command.help_command import HelpCommand
|
||||||
@ -45,7 +45,7 @@ from modules.base.events.base_on_voice_state_update_event_scheduled_event_bonus
|
|||||||
from modules.base.forms.bug_report_form import BugReportForm
|
from modules.base.forms.bug_report_form import BugReportForm
|
||||||
from modules.base.forms.complaint_form import ComplaintForm
|
from modules.base.forms.complaint_form import ComplaintForm
|
||||||
from modules.base.helper.base_reaction_handler import BaseReactionHandler
|
from modules.base.helper.base_reaction_handler import BaseReactionHandler
|
||||||
from modules.base.scheduled_events_watcher import ScheduledEventsWatcher
|
from modules.base.tasks.scheduled_events_watcher import ScheduledEventsWatcher
|
||||||
from modules.base.service.event_service import EventService
|
from modules.base.service.event_service import EventService
|
||||||
from modules.base.service.user_warnings_service import UserWarningsService
|
from modules.base.service.user_warnings_service import UserWarningsService
|
||||||
|
|
||||||
|
26
bot/src/modules/base/tasks/__init__.py
Normal file
26
bot/src/modules/base/tasks/__init__.py
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
"""
|
||||||
|
bot sh-edraft.de Discord bot
|
||||||
|
~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Discord bot for customers of sh-edraft.de
|
||||||
|
|
||||||
|
:copyright: (c) 2022 - 2023 sh-edraft.de
|
||||||
|
:license: MIT, see LICENSE for more details.
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
__title__ = "modules.base.tasks"
|
||||||
|
__author__ = "Sven Heidemann"
|
||||||
|
__license__ = "MIT"
|
||||||
|
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
|
||||||
|
__version__ = "1.2.2"
|
||||||
|
|
||||||
|
from collections import namedtuple
|
||||||
|
|
||||||
|
|
||||||
|
# imports:
|
||||||
|
|
||||||
|
VersionInfo = namedtuple("VersionInfo", "major minor micro")
|
||||||
|
version_info = VersionInfo(major="1", minor="2", micro="2")
|
@ -66,7 +66,7 @@ class ScheduledEventsWatcher(TaskABC):
|
|||||||
|
|
||||||
return ts
|
return ts
|
||||||
|
|
||||||
@tasks.loop(minutes=1)
|
@tasks.loop(hours=24)
|
||||||
async def watch(self):
|
async def watch(self):
|
||||||
self._logger.info(__name__, "Watching scheduled events")
|
self._logger.info(__name__, "Watching scheduled events")
|
||||||
try:
|
try:
|
Loading…
Reference in New Issue
Block a user