MCPcopy Create free account
hub / github.com/C3ting/ARL / update_services

Method update_services

app/services/baseUpdateTask.py:10–15  ·  view source on GitHub ↗
(self, service_name: str, elapsed: float)

Source from the content-addressed store, hash-verified

8 self.task_id = task_id
9
10 def update_services(self, service_name: str, elapsed: float):
11 elapsed = "{:.2f}".format(elapsed)
12 self.update_task_field("status", service_name)
13 query = {"_id": ObjectId(self.task_id)}
14 update = {"$push": {"service": {"name": service_name, "elapsed": float(elapsed)}}}
15 utils.conn_db('task').update_one(query, update)
16
17 def update_task_field(self, field=None, value=None):
18 query = {"_id": ObjectId(self.task_id)}

Callers 2

runMethod · 0.45
run_funcMethod · 0.45

Calls 1

update_task_fieldMethod · 0.95

Tested by

no test coverage detected