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

Method statistic

app/tasks/github.py:78–89  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

76 utils.conn_db(self.collection).update_one(query, update)
77
78 def statistic(self):
79 query = {"_id": ObjectId(self.task_id)}
80 table_list = ['github_result']
81 result = {}
82 for table in table_list:
83 cnt = utils.conn_db(table).count_documents({"github_task_id": self.task_id})
84 stat_key = table + "_cnt"
85 result[stat_key] = cnt
86
87 logger.info("insert task stat")
88 update = {"$set": {"statistic": result}}
89 utils.conn_db(self.collection).update_one(query, update)
90
91 def run(self):
92 self.set_start_time()

Callers 2

runMethod · 0.95
runMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected