Tendrid / celery-redis-priority-test

Used to determine how priorities are working in celery with a redis backend
30 stars 6 forks source link

Wonderful initiative - some questions/observations #2

Open SHxKM opened 5 years ago

SHxKM commented 5 years ago

Thanks for taking the initiative to answer this wildly undocumented Celery feature.

In the README you write about some "undocumented/wrong" assertions. I think it would be worthwhile to note what is actually true.

Here's an observation I made, I'm not sure if it's backed by your tests: given task_low sent with no priority argument, and task_high sent with priority=0, no task is prioritized. However, if we also explicitly add priority=(>1) to task_low, then task_high is prioritized. Meaning - to get priority all tasks should be invoked with this argument.

That's at least my experience from unscientific testing. I'm not sure if there's a way around this.

Tendrid commented 1 week ago

Sorry i haven't responded until now, i sorta set this project on the back burner and ignored it :laughing:

I haven't tested your assertion, but it sounds plausible. I'm going to leave this issue open indefinitely for others to stumble across, and perhaps share their own findings.