Platform dependent results found:
# test_celery.py
import celery
app = celery.Celery(
'test_celery'
,broker = 'redis://a.redis.server:6379/9'
)
app.conf.update(
CELERY_RESULT_BACKEND = 'redis://a.redis.server:6379/9'
)
@app.task()
def add(x, y):
return x + y
if __name__ == '__main__':
result = add.delay(1,1).get()
print(result)
# result is 2, works on both
result = celery.chain([
add.si(1,1)
])().get()
print(result)
# result is 2, works on both
result = celery.group([
add.si(1,1)
,add.si(2,2)
])().get()
print(result)
# result is [2, 4], works on both
result = celery.chain([
add.si(1,1)
,add.si(2,2)
])().get()
print(result)
# result is hang on windows and 4 on linux
I did some debugging, looks like something isn't going quite right around line 280 of celery/app/trace.py but it is likely that I have no idea what I'm talking about. This file works on ubuntu pointing to the same redis server. Tested both using Python 3.4 Celery 3.1.17
To reproduce, in each environment:
- run
celery -A test_celery worker --loglevel=INFO
- run
python3 test_celery.py
Platform dependent results found:
I did some debugging, looks like something isn't going quite right around line 280 of
celery/app/trace.pybut it is likely that I have no idea what I'm talking about. This file works on ubuntu pointing to the same redis server. Tested both using Python 3.4 Celery 3.1.17To reproduce, in each environment:
celery -A test_celery worker --loglevel=INFOpython3 test_celery.py