Count the tasks in every status. Args: query (dict, optional): the query dict. Defaults to {}. Returns: dict
(self, query={})
| 394 | self.task_pool.delete_many(query) |
| 395 | |
| 396 | def task_stat(self, query={}) -> dict: |
| 397 | """ |
| 398 | Count the tasks in every status. |
| 399 | |
| 400 | Args: |
| 401 | query (dict, optional): the query dict. Defaults to {}. |
| 402 | |
| 403 | Returns: |
| 404 | dict |
| 405 | """ |
| 406 | query = query.copy() |
| 407 | query = self._decode_query(query) |
| 408 | tasks = self.query(query=query, decode=False) |
| 409 | status_stat = {} |
| 410 | for t in tasks: |
| 411 | status_stat[t["status"]] = status_stat.get(t["status"], 0) + 1 |
| 412 | return status_stat |
| 413 | |
| 414 | def reset_waiting(self, query={}): |
| 415 | """ |
no test coverage detected