Ability to register tasks individually, not via modules
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- python
- Ambito
- testing-qa
Direzione di ricerca
Inizia con i fixture esistenti default_worker_tasks e default_worker_app, quindi esamina come un’istanza di celery.Task viene registrata nel worker. Definisci il fixture register_task attorno all’API proposta e aggiungi una copertura che dimostri che un task registrato singolarmente può essere individuato ed eseguito dal worker.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Checklist
- I have checked the issues list
for similar or identical feature requests. - I have checked the pull requests list
for existing proposed implementations of this feature. - I have checked the commit log
to find out if the same feature was already implemented in the
main branch. - I have included all related issues and possible duplicate issues in this issue
(If there are none, check this box anyway).
Related Issues and Possible Duplicates
Related Issues
- None
Possible Duplicates
- None
Brief Summary
I am currently trying to build an abstraction over celery that would allow registering and running tasks.
However, my tests do not work because the worker doesn't find the tasks, and even using the default_worker_tasks doesn't work because the decorator used to define the tasks isn't the celery.Celery(...).task one, but a custom decorator that returns a custom Task class which completely abstracts celery away.
It would be very helpful to have a way to register tasks in the worker individually, by passing an instance of the celery.Task class to some fixture
Design
Have a fixture called something like register_task that would look like this
@pytest.fixture
def register_task():
def _register(task: celery.Task):
... # do something to register
return _register
# in the test
@pytest.fixture
def register_test_tasks(default_worker_app, register_task):
task = default_worker_app.task(some_callable, name="task_name"))
register_task(task)
Proposed Behavior
The behaviour is simply being able to register tasks individually in the worker, by passing an instance of celery.Task the the fixture defined above.
Proposed UI/UX
Diagrams
N/A
Alternatives
None
- Lingua principale
- Python
- Stelle
- 82
- Fork
- 17
- Merge medio
- 2g 6h
- PR unite (30g)
- 26
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di celery/pytest-celery
-
documentation
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
celery/pytest-celery#459 ·
I maintainer di solito rispondono entro 1 giorno
-
`celery_worker` fixture name colides with `celery_worker` fixture from `celery.contrib.pytest`Forse di nuovo libera @Nusnus l’ha presa 617 giorni fa e non c’è nessuna pull request aperta. Apertabug
celery/pytest-celery#442 · 7 commenti · 5 reazioni · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Missing documentation on how to include source codeForse di nuovo libera @Nusnus l’ha presa 300 giorni fa e non c’è nessuna pull request aperta. Apertadocumentation
celery/pytest-celery#439 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di celery/pytest-celery
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
aws-samples/sample-per-model-bedrock#261 ·
I maintainer di solito rispondono entro 1 giorno
-
[UI/Accessibility] Low contrast text visibility in country selection dropdown on settings pageAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
pwncollege/dojo#1188 ·
I maintainer di solito rispondono entro 1 giorno
-
bug launcher packaging
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
tenstorrent/tt-studio#1426 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
python-attrs/cattrs#796 ·
I maintainer di solito rispondono entro 1 giorno