mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
updated stats for spider
This commit is contained in:
@@ -216,12 +216,7 @@ class StatsApi(BaseApi):
|
||||
col_name = spider.get('col')
|
||||
if col_name is not None:
|
||||
for task in tasks:
|
||||
result_count += db_manager.count(col_name, {
|
||||
'task_id': task['_id'],
|
||||
'create_ts': {
|
||||
'$gte': datetime.now() - timedelta(30)
|
||||
}
|
||||
})
|
||||
result_count += db_manager.count(col_name, {'task_id': task['_id']})
|
||||
|
||||
# top tasks
|
||||
# top_10_tasks = db_manager.list('tasks', {'spider_id': spider['_id']})
|
||||
|
||||
Reference in New Issue
Block a user