(slug)
return result
Get a dict of migrations by status that have been started but not completed

    :returns: `{<MigrationStatus>: [<DomainMigrationProgress>, ...], ...}`
Get a dict of migrations by status that have been started but not completed
Get a dict of migrations by status that have been started but not completed
def get_uncompleted_migrations(slug):
    """Get a dict of migrations by status that have been started but not completed

    :returns: `{<MigrationStatus>: [<DomainMigrationProgress>, ...], ...}`
    """
    progs = DomainMigrationProgress.objects.filter(
        ~Q(migration_status=MigrationStatus.COMPLETE),
        ~Q(migration_status=MigrationStatus.NOT_STARTED),
        migration_slug=slug,
    )
    result = defaultdict(list)
    for progress in progs:
        if progress.completed_on is not None:
            assert progress.migration_status != MigrationStatus.COMPLETE, progress
            log.warn("uncompleted migation (status=%s) has a completed-on date: %s",
                progress.migration_status, progress.domain)
        result[progress.migration_status].append(progress)
    return result
def get_uncompleted_migrations ( slug ) : progs = DomainMigrationProgress . objects . filter ( ~ Q ( migration_status = MigrationStatus . COMPLETE ) , ~ Q ( migration_status = MigrationStatus . NOT_STARTED ) , migration_slug = slug , ) result = defaultdict ( list ) for progress in progs : if progress . completed_on is not None : assert progress . migration_status != MigrationStatus . COMPLETE , progress log . warn ( "uncompleted migation (status=%s) has a completed-on date: %s" , progress . migration_status , progress . domain ) result [ progress . migration_status ] . append ( progress ) return result