mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-16 20:08:09 +00:00
fix formatting (#55)
This commit is contained in:
@ -106,9 +106,7 @@ def on_worker_event(machine_id: UUID, event: WorkerEvent) -> func.HttpResponse:
|
|||||||
|
|
||||||
task.save()
|
task.save()
|
||||||
node.save()
|
node.save()
|
||||||
task_event = TaskEvent(
|
task_event = TaskEvent(task_id=task_id, machine_id=machine_id, event_data=event)
|
||||||
task_id=task_id, machine_id=machine_id, event_data=event
|
|
||||||
)
|
|
||||||
task_event.save()
|
task_event.save()
|
||||||
return ok(BoolResult(result=True))
|
return ok(BoolResult(result=True))
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ def post(req: func.HttpRequest) -> func.HttpResponse:
|
|||||||
pool_name=registration_request.pool_name,
|
pool_name=registration_request.pool_name,
|
||||||
machine_id=registration_request.machine_id,
|
machine_id=registration_request.machine_id,
|
||||||
scaleset_id=registration_request.scaleset_id,
|
scaleset_id=registration_request.scaleset_id,
|
||||||
version=registration_request.version
|
version=registration_request.version,
|
||||||
)
|
)
|
||||||
agent_node.save()
|
agent_node.save()
|
||||||
elif agent_node.version.lower != registration_request.version:
|
elif agent_node.version.lower != registration_request.version:
|
||||||
|
@ -155,7 +155,9 @@ class Node(BASE_NODE, ORMMixin):
|
|||||||
for node in nodes:
|
for node in nodes:
|
||||||
if node.state not in NodeState.ready_for_reset():
|
if node.state not in NodeState.ready_for_reset():
|
||||||
logging.info(
|
logging.info(
|
||||||
"stopping task %s on machine_id:%s", task_id, node.machine_id,
|
"stopping task %s on machine_id:%s",
|
||||||
|
task_id,
|
||||||
|
node.machine_id,
|
||||||
)
|
)
|
||||||
node.state = NodeState.done
|
node.state = NodeState.done
|
||||||
node.save()
|
node.save()
|
||||||
@ -822,7 +824,8 @@ class Scaleset(BASE_SCALESET, ORMMixin):
|
|||||||
break
|
break
|
||||||
if not node_state:
|
if not node_state:
|
||||||
node_state = ScalesetNodeState(
|
node_state = ScalesetNodeState(
|
||||||
machine_id=machine_id, instance_id=instance_id,
|
machine_id=machine_id,
|
||||||
|
instance_id=instance_id,
|
||||||
)
|
)
|
||||||
self.nodes.append(node_state)
|
self.nodes.append(node_state)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user