Skip to content
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

Change install_requires in setup.py? #33

Open
msaizar opened this issue Jul 24, 2018 · 2 comments
Open

Change install_requires in setup.py? #33

msaizar opened this issue Jul 24, 2018 · 2 comments

Comments

@msaizar
Copy link
Contributor

msaizar commented Jul 24, 2018

django-celery is not compatible with the latest Celery version, which already comes with Django integration. Is it possible to remove this requirement, or make a conditional requirement such as django-celery>=3.1 or celery>=4.0?

@jezdez
Copy link
Member

jezdez commented Aug 9, 2018

Yeah, not a bad idea. Mind sending a PR?

@msaizar
Copy link
Contributor Author

msaizar commented Aug 13, 2018

One test seems to be failing for me, whether I remove the requirement or not.

    def test_transfer_retried(self):
        """
            Make sure the transfer task is retried correctly.
            """
        storage = QueuedStorage(
            local='django.core.files.storage.FileSystemStorage',
            remote='django.core.files.storage.FileSystemStorage',
            local_options=dict(location=self.local_dir),
            remote_options=dict(location=self.remote_dir),
            task='tests.tasks.RetryingTask')
        field = models.TestModel._meta.get_field('testfile')
        field.storage = storage

        self.assertFalse(models.TestModel.retried)

        obj = models.TestModel()
        obj.testfile.save(self.test_file_name, File(self.test_file))
        obj.save()
>       self.assertFalse(obj.testfile.storage.result.get())
        self.assertTrue(models.TestModel.retried)

E RuntimeError: Never call result.get() within a task!
E See http://docs.celeryq.org/en/latest/userguide/tasks.html#task-synchronous-subtasks

I am unable to fix that test, but removing that assert is a workaround. This test seems to work with Celery <4, it starts failling on Celery <=4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants