from . import serializable
class Task(serializable.Serializable):
def __init__(self, job):
self.job = job
self.task_id = None
self.ignore = False
self.nodes_working = []
def should_execute(self):
if self.ignore:
return False
def unserialize(self, data):
super().unserialize(data)
self.ignore = data['ignore']
return self
def serialize(self):
out = super().serialize()
out['ignore'] = self.ignore
return out