def _group_download_start_metadata(group: GroupDownloadOperationConfiguration): return GroupDownloadResult( feed=group.feed, group=group.group, total_records=0, status=FeedDownloader.State.in_progress.value, started=datetime.datetime.utcnow(), )
def _update_download_complete(conf: GroupDownloadResult, record_count: int) -> GroupDownloadResult: conf.status = FeedDownloader.State.complete.value conf.ended = datetime.datetime.utcnow() conf.total_records = record_count return conf