I noticed that the
ospd daemon is using the same period setting (10s) when run scheduler (for update VT) and start queued scans, but I think it is better to separate this setting for the 2 tasks. Waiting 10s before start queued scan is quite long and may affect user experience.
Additionally, why don’t we move the
sleep statement to the end of the
while loop so that the queued scans can be started earlier at the first run? (I’m not good at programming, so sorry if my assumption is wrong).
def run(self) -> None: """Starts the Daemon, handling commands until interrupted.""" try: while True: time.sleep(SCHEDULER_CHECK_PERIOD) self.scheduler() self.clean_forgotten_scans() self.start_queued_scans() self.wait_for_children() except KeyboardInterrupt: logger.info("Received Ctrl-C shutting-down ...")