use the primitive types in more places (#514)

This commit is contained in:
bmc-msft
2021-02-05 13:10:37 -05:00
committed by GitHub
parent 51f4eea069
commit 1d74379a70
17 changed files with 74 additions and 61 deletions

View File

@ -18,6 +18,7 @@ from onefuzztypes.events import (
from onefuzztypes.models import Error
from onefuzztypes.models import Task as BASE_TASK
from onefuzztypes.models import TaskConfig, TaskVm, UserInfo
from onefuzztypes.primitives import PoolName
from ..azure.image import get_os
from ..azure.queue import create_queue, delete_queue
@ -165,7 +166,7 @@ class Task(BASE_TASK, ORMMixin):
return task
@classmethod
def get_tasks_by_pool_name(cls, pool_name: str) -> List["Task"]:
def get_tasks_by_pool_name(cls, pool_name: PoolName) -> List["Task"]:
tasks = cls.search_states(states=TaskState.available())
if not tasks:
return []