]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Mon, 10 Jul 2023 17:35:39 +0000 (19:35 +0200)
committerRoland Häder <roland@mxchange.org>
Mon, 10 Jul 2023 17:35:39 +0000 (19:35 +0200)
- cannot get len() (number of rows) from reader
- instances.set_total_blocks() accepts as 2nd parameter not direct count, so
  let's handle the domain list

fba/commands.py

index fb192641ba07750317c85652d5c924544efb4f85..6b63c8debf8527e3a5838aa03d4d77b519b03ad1 100644 (file)
@@ -986,7 +986,6 @@ def fetch_oliphant(args: argparse.Namespace) -> int:
 
         blockdict = list()
 
-        logger.info("Processing %d rows ...", len(reader))
         cnt = 0
         for row in reader:
             logger.debug("row[%s]='%s'", type(row), row)
@@ -1047,8 +1046,8 @@ def fetch_oliphant(args: argparse.Namespace) -> int:
             if reject_reports:
                 utils.process_block(block["blocker"], domain, None, "reject_reports")
 
-        logger.debug("Invoking instances.set_total_blocks(%s, %d) ...", block["blocker"], cnt)
-        instances.set_total_blocks(block["blocker"], cnt)
+        logger.debug("Invoking instances.set_total_blocks(%s, domains()=%d) ...", block["blocker"], len(domains))
+        instances.set_total_blocks(block["blocker"], domains)
 
         logger.debug("Checking if blocker='%s' has pending updates ...", block["blocker"])
         if instances.has_pending(block["blocker"]):