diff --git a/esmerald/contrib/schedulers/asyncz/config.py b/esmerald/contrib/schedulers/asyncz/config.py index 1dded3f6..7139bdd5 100644 --- a/esmerald/contrib/schedulers/asyncz/config.py +++ b/esmerald/contrib/schedulers/asyncz/config.py @@ -1,4 +1,3 @@ -import warnings from datetime import datetime, timezone as dtimezone from typing import Any, Callable, Dict, Type, Union @@ -41,7 +40,7 @@ def __init__( """ super().__init__(**kwargs) self.scheduler_class = scheduler_class - self.tasks = tasks + self.tasks = tasks or {} self.timezone = timezone self.configurations = configurations self.options = kwargs @@ -50,13 +49,6 @@ def __init__( if not isinstance(task, str) or not isinstance(module, str): raise ImproperlyConfigured("The dict of tasks must be Dict[str, str].") - if not self.tasks: - warnings.warn( - "Esmerald is starting the scheduler, yet there are no tasks declared.", - UserWarning, - stacklevel=2, - ) - # Load the scheduler object self.handler = self.get_scheduler( scheduler=self.scheduler_class,