Skip to content

Fix celerybeat cleanup error #8269

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions tests/unit/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,6 @@ def test_tls_redis_backend():


class TestWarehouseTask:
def test_header(self):
def header(request, thing):
pass

task_type = type(
"Foo", (tasks.WarehouseTask,), {"__header__": staticmethod(header)}
)

obj = task_type()
obj.__header__(object())

def test_call(self, monkeypatch):
request = pretend.stub()
registry = pretend.stub()
Expand Down
2 changes: 0 additions & 2 deletions warehouse/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ def _params_from_url(self, url, defaults):
class WarehouseTask(celery.Task):
def __new__(cls, *args, **kwargs):
obj = super().__new__(cls, *args, **kwargs)
if getattr(obj, "__header__", None) is not None:
obj.__header__ = functools.partial(obj.__header__, object())

# We do this here instead of inside of __call__ so that exceptions
# coming from the transaction manager get caught by the autoretry
Expand Down