示例#1
0
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(),
    )
示例#2
0
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