mirror of
https://github.com/simon987/od-database.git
synced 2025-12-13 23:09:01 +00:00
Task logs now stored on main server
This commit is contained in:
@@ -36,9 +36,6 @@ class TaskManager:
|
||||
def get_non_indexed_results(self):
|
||||
return self.db.get_non_indexed_results()
|
||||
|
||||
def get_all_results(self):
|
||||
return self.db.get_all_results()
|
||||
|
||||
def execute_queued_task(self):
|
||||
|
||||
if len(self.current_tasks) <= self.max_processes:
|
||||
@@ -103,20 +100,4 @@ class TaskManager:
|
||||
if task.website_id == task_result.website_id:
|
||||
del current_tasks[i]
|
||||
|
||||
def get_stats(self):
|
||||
|
||||
task_results = self.get_all_results()
|
||||
stats = dict()
|
||||
|
||||
if len(task_results) > 0:
|
||||
stats["task_count"] = len(task_results)
|
||||
stats["task_time"] = sum((task.end_time - task.start_time) for task in task_results)
|
||||
stats["task_time_avg"] = stats["task_time"] / len(task_results)
|
||||
stats["task_file_count"] = sum(task.file_count for task in task_results)
|
||||
stats["task_file_count_avg"] = stats["task_file_count"] / len(task_results)
|
||||
|
||||
return stats
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user