how can i pass argument to celery task?

fuzes

this is my celery task

def task_a(arg1, arg2, arg3, arg4)

and i call the task like following

arg1 is list and arg2,3,4 is integer

task_a.apply_async(arg1, arg2, arg3, arg4)

and i got an error message

    File "/opt/envDjango/lib/python3.5/site-packages/celery/app/task.py", line 518, in apply_async
    check_arguments(*(args or ()), **(kwargs or {}))
    TypeError: functools.partial object argument after ** must be a mapping, not int

how can i solve the problem??

i tried to make a dictionary and change argument position, they are all failed...

Lemayzeur

delay will work instead of apply_async: see doc here

task_a.delay(*arg,**kwargs)

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

How can I evaluate an argument in a preprocessor macro to pass to sizeof?

分類Dev

How or Can I pass a function with argument as a parameter to a function in lua?

分類Dev

How can I create and pass as argument a multidimensional ctypes array?

分類Dev

how can I pass a single argument to a react function that returns a component?

分類Dev

How can I pass argument stored on a variable to WGET

分類Dev

How can I pass a Swift array as an argument to a thread?

分類Dev

How can I pass all the filenames in a directory as an argument to a command in Bash?

分類Dev

How can I conditionally pass an argument from a POSIX shell script?

分類Dev

How to pass a class based task into CELERY_BEAT_SCHEDULE

分類Dev

Can I pass an argument to a function through a keymapping?

分類Dev

How to unacknowledge message when I run a celery task?

分類Dev

Pass parent task arguments to all celery subtasks

分類Dev

Rcpp: I can't pass argument to c++ function

分類Dev

Can I pass an argument/switch/parameter to a VSPackage MenuCommand?

分類Dev

How can I set up Celery to call a custom worker initialization?

分類Dev

How can i use celery with different code base in API and workers

分類Dev

Why can I pass an integer as a task parameter but can't pass a struct variable?

分類Dev

How can I automate a task on a certain event?

分類Dev

How to get arguments passed to the celery's task?

分類Dev

django celery how to print or check logging for the task

分類Dev

How to set periodic task on Django using celery?

分類Dev

How do I pass a powershell argument to a non powershell command?

分類Dev

How declare function to pass one argument argv[i] at a time? In C

分類Dev

How do I pass a file as an argument in bash scripting?

分類Dev

How pass an argument rails

分類Dev

how can i pass variable in parameter as a function?

分類Dev

How can I pass properties to a StringEnumConverter in a JsonConverterAttribute

分類Dev

How can i pass image array to JSONObject?

分類Dev

How can I pass into a directive a service?

Related 関連記事

  1. 1

    How can I evaluate an argument in a preprocessor macro to pass to sizeof?

  2. 2

    How or Can I pass a function with argument as a parameter to a function in lua?

  3. 3

    How can I create and pass as argument a multidimensional ctypes array?

  4. 4

    how can I pass a single argument to a react function that returns a component?

  5. 5

    How can I pass argument stored on a variable to WGET

  6. 6

    How can I pass a Swift array as an argument to a thread?

  7. 7

    How can I pass all the filenames in a directory as an argument to a command in Bash?

  8. 8

    How can I conditionally pass an argument from a POSIX shell script?

  9. 9

    How to pass a class based task into CELERY_BEAT_SCHEDULE

  10. 10

    Can I pass an argument to a function through a keymapping?

  11. 11

    How to unacknowledge message when I run a celery task?

  12. 12

    Pass parent task arguments to all celery subtasks

  13. 13

    Rcpp: I can't pass argument to c++ function

  14. 14

    Can I pass an argument/switch/parameter to a VSPackage MenuCommand?

  15. 15

    How can I set up Celery to call a custom worker initialization?

  16. 16

    How can i use celery with different code base in API and workers

  17. 17

    Why can I pass an integer as a task parameter but can't pass a struct variable?

  18. 18

    How can I automate a task on a certain event?

  19. 19

    How to get arguments passed to the celery's task?

  20. 20

    django celery how to print or check logging for the task

  21. 21

    How to set periodic task on Django using celery?

  22. 22

    How do I pass a powershell argument to a non powershell command?

  23. 23

    How declare function to pass one argument argv[i] at a time? In C

  24. 24

    How do I pass a file as an argument in bash scripting?

  25. 25

    How pass an argument rails

  26. 26

    how can i pass variable in parameter as a function?

  27. 27

    How can I pass properties to a StringEnumConverter in a JsonConverterAttribute

  28. 28

    How can i pass image array to JSONObject?

  29. 29

    How can I pass into a directive a service?

ホットタグ

アーカイブ