Git Product home page Git Product logo

celery_async_issue's Introduction

This project demonstrates a bug that occurs when a chain is added to a chord. There are 6 tests:

Name Test async Result
test_chord group() | s() yes pass
test_chord_chain_one_task group() | s() | s() yes fail
test_chord_chain_two_tasks group() | s() | s() | s() yes pass
test_chord_sync group() | s() no pass
test_chord_chain_one_task_sync group() | s() | s() no pass
test_chord_chain_two_tasks_sync group() | s() | s() | s() no pass

Strangely, only the asynchronous version of a chord followed by another task shows a problem; the synchronous version passes. Adding another task to the chain (3rd row) "fixes" the problem.

Install

pip install -r requirements.txt

for celery 3.1.13

Run Tests

nosetests

The test class spins up redis-server and a celery worker.

This is the test that fails:

def test_chord_chain_one_task(self):
    c = (group([add.si(2, 2), add.si(4, 4)])
         | add_list.s()
         | mul.s(2))
    res = c.apply_async()
    self.assertEqual(res.get(), 24)

Try Celery Master

The current master branch (2fddb876e1b966c3540aadbbc2257dfd493abb85) fails every async test with:

TypeError: group object got multiple values for keyword argument 'task_id'

To install celery master branch: pip install -r requirements_master.txt

celery_async_issue's People

Contributors

aneilbaboo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.