mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-16 11:58: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()
|
||||
node.save()
|
||||
task_event = TaskEvent(
|
||||
task_id=task_id, machine_id=machine_id, event_data=event
|
||||
)
|
||||
task_event = TaskEvent(task_id=task_id, machine_id=machine_id, event_data=event)
|
||||
task_event.save()
|
||||
return ok(BoolResult(result=True))
|
||||
|
||||
|
@ -95,7 +95,7 @@ def post(req: func.HttpRequest) -> func.HttpResponse:
|
||||
pool_name=registration_request.pool_name,
|
||||
machine_id=registration_request.machine_id,
|
||||
scaleset_id=registration_request.scaleset_id,
|
||||
version=registration_request.version
|
||||
version=registration_request.version,
|
||||
)
|
||||
agent_node.save()
|
||||
elif agent_node.version.lower != registration_request.version:
|
||||
|
@ -155,7 +155,9 @@ class Node(BASE_NODE, ORMMixin):
|
||||
for node in nodes:
|
||||
if node.state not in NodeState.ready_for_reset():
|
||||
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.save()
|
||||
@ -822,7 +824,8 @@ class Scaleset(BASE_SCALESET, ORMMixin):
|
||||
break
|
||||
if not node_state:
|
||||
node_state = ScalesetNodeState(
|
||||
machine_id=machine_id, instance_id=instance_id,
|
||||
machine_id=machine_id,
|
||||
instance_id=instance_id,
|
||||
)
|
||||
self.nodes.append(node_state)
|
||||
|
||||
|
Reference in New Issue
Block a user