Browse Source

Removed unused celery.apps.worker.run_worker

Ask Solem 14 năm trước cách đây
mục cha
commit
6bacdb1972
2 tập tin đã thay đổi với 0 bổ sung12 xóa
  1. 0 4
      celery/apps/worker.py
  2. 0 8
      celery/tests/test_bin/test_celeryd.py

+ 0 - 4
celery/apps/worker.py

@@ -310,7 +310,3 @@ def install_HUP_not_supported_handler(worker):
             "Restarting with HUP is unstable on this platform!")
 
     platforms.install_signal_handler("SIGHUP", warn_on_HUP_handler)
-
-
-def run_worker(*args, **kwargs):
-    return Worker(*args, **kwargs).run()

+ 0 - 8
celery/tests/test_bin/test_celeryd.py

@@ -195,14 +195,6 @@ class test_funs(unittest.TestCase):
         opts, args = cmd.parse_options("celeryd", ["--concurrency=512"])
         self.assertEqual(opts.concurrency, 512)
 
-    @disable_stdouts
-    def test_run_worker(self):
-        p, cd.Worker = cd.Worker, Worker
-        try:
-            cd.run_worker(discard=True)
-        finally:
-            cd.Worker = p
-
     @disable_stdouts
     def test_main(self):
         p, cd.Worker = cd.Worker, Worker