From: Michael Tremer Date: Fri, 27 Feb 2026 11:12:32 +0000 (+0000) Subject: checker: Make it possible to manually check a domain again X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=428e25410746d651a063d95a60cd9e42d0c96dda;p=dbl.git checker: Make it possible to manually check a domain again Signed-off-by: Michael Tremer --- diff --git a/src/dbl/checker.py b/src/dbl/checker.py index 8960c66..0e4a5ed 100644 --- a/src/dbl/checker.py +++ b/src/dbl/checker.py @@ -28,6 +28,7 @@ import sqlmodel from . import database from . import domains +from . import util # Setup logging log = logging.getLogger(__name__) @@ -54,7 +55,9 @@ class Checker(object): threshold = 1024 # If no domains have been passed, fetch some from the database - if not domains: + if domains: + domains = util.aiterable(domains) + else: domains = self.get_domains() with self.executor: diff --git a/src/dbl/util.py b/src/dbl/util.py index b43f64d..021360b 100644 --- a/src/dbl/util.py +++ b/src/dbl/util.py @@ -31,6 +31,10 @@ from .i18n import _ # Setup logging log = logging.getLogger(__name__) +async def aiterable(iterable): + for item in iterable: + yield item + class Stopwatch(object): def __init__(self, task): self.task = task