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

Make more params in task() optional? #51

Open
cktang88 opened this issue Nov 28, 2021 · 3 comments
Open

Make more params in task() optional? #51

cktang88 opened this issue Nov 28, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@cktang88
Copy link
Contributor

cktang88 commented Nov 28, 2021

I believe most of the args in task() should be optional, eg. all the retry params, and acks_late, among others?

@sbdchd sbdchd added the bug Something isn't working label Nov 28, 2021
@cktang88 cktang88 changed the title Make more params in task() nullable? Make more params in task() optional? Dec 3, 2021
@last-partizan
Copy link
Contributor

Actually, all params for task are optional, it could even be used as @app.task.

I think i should be able to create PR for this.

last-partizan added a commit to last-partizan/celery-types that referenced this issue Dec 31, 2021
@last-partizan
Copy link
Contributor

I created PR for task without arguments.

But, i did nothing about optional params.

@cktang88 what are your use-case for this?

I think, current typing is correct. For example acks_late is bool, with some default value. All kwargs are optional and can be omitted.

kodiakhq bot pushed a commit that referenced this issue Dec 31, 2021
This add overload for following case:

```
@app.task
def task_func():
     ...
```

Refs #51
@palfrey
Copy link
Contributor

palfrey commented Feb 17, 2022

Ditto for shared_task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants