Skip to content

Commit

Permalink
fix: remove duplicated method. (#2020)
Browse files Browse the repository at this point in the history
Closes #1888
  • Loading branch information
teleyinex authored Feb 27, 2021
1 parent 90c434f commit e658e23
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -745,27 +745,6 @@ def update_counters():
db.session.commit()


def update_project_stats():
"""Update project stats for draft projects."""
from pybossa.core import db
from pybossa.core import project_repo, task_repo, result_repo
from pybossa.model.task import Task
from pybossa.model.task_run import TaskRun
from pybossa.model.counter import Counter
import pybossa.cache.project_stats as stats

projects = project_repo.get_all()

for project in projects:
print("Working on project: %s" % project.short_name)
sql_query = """INSERT INTO project_stats
(project_id, n_tasks, n_task_runs, n_results, n_volunteers,
n_completed_tasks, overall_progress, average_time,
n_blogposts, last_activity, info)
VALUES (%s, 0, 0, 0, 0, 0, 0, 0, 0, 0, '{}');""" % (project.id)
db.engine.execute(sql_query)


def anonymize_ips():
"""Anonymize all the IPs of the server."""
from pybossa.core import anonymizer, task_repo
Expand Down

0 comments on commit e658e23

Please sign in to comment.