Remove print, add task Typing
This commit is contained in:
@@ -38,13 +38,11 @@ class PrintTask(ABC):
|
|||||||
A print task holds information about what we are looking to print.
|
A print task holds information about what we are looking to print.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, task_type):
|
def __init__(self, task_type: TaskType):
|
||||||
self.task_id = self._generate_id()
|
self.task_id = self._generate_id()
|
||||||
self.task_type = task_type
|
self.task_type = task_type
|
||||||
self.status = "pending" # pending, processing, completed, failed
|
self.status = "pending" # pending, processing, completed, failed
|
||||||
|
|
||||||
print("Created a new " + str(self.task_type) + " with ID " + self.task_id)
|
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def get_print_data(self):
|
def get_print_data(self):
|
||||||
"""Return data formatted for printer"""
|
"""Return data formatted for printer"""
|
||||||
|
|||||||
Reference in New Issue
Block a user