swh.scheduler.journal_client module

swh.scheduler.journal_client.max_date(*dates: Optional[datetime.datetime]) datetime.datetime[source]

Return the max date of given (possibly None) dates

At least one date must be not None.

swh.scheduler.journal_client.process_journal_objects(messages: Dict[str, List[Dict]], *, scheduler: swh.scheduler.interface.SchedulerInterface) None[source]

Read messages from origin_visit_status journal topics, then inserts them in the scheduler “origin_visit_stats” table.

Worker function for JournalClient.process(worker_fn), after currification of scheduler and task_names.