Browse Source

Remove the CollectStatisticsTask (was not optimal)

Ask Solem 16 years ago
parent
commit
69e117791a
2 changed files with 0 additions and 15 deletions
  1. 0 3
      celery/bin/celeryd.py
  2. 0 12
      celery/task.py

+ 0 - 3
celery/bin/celeryd.py

@@ -176,9 +176,6 @@ def run_worker(concurrency=DAEMON_CONCURRENCY, detach=False,
     print(". Launching celery, please hold on to something...")
 
     if statistics:
-        from celery.task import tasks, CollectStatisticsTask
-        tasks.register(CollectStatisticsTask)
-
         settings.CELERY_STATISTICS = statistics
 
     if not concurrency:

+ 0 - 12
celery/task.py

@@ -599,15 +599,3 @@ def ping():
         'pong'
     """
     return PingTask.apply_async().get()
-
-
-class CollectStatisticsTask(PeriodicTask):
-    name = "celery.collect-statistics"
-    run_every = timedelta(seconds=STATISTICS_COLLECT_INTERVAL)
-
-    def run(self, **kwargs):
-        from celery.monitoring import StatsCollector
-        stats = StatsCollector()
-        stats.collect()
-        stats.dump_to_cache()
-        return True