And you call the task without the optional argument like this:
example.delay()
You get an error in celery_once. Apparently, optional arguments are not supported in this context.
Traceback (most recent call last):
File "/home/erik/python/projects/aa-dev/venv/lib/python3.10/site-packages/celery/app/trace.py", line 569, in trace_task
task_after_return(
File "/home/erik/python/projects/aa-dev/venv/lib/python3.10/site-packages/celery_once/tasks.py", line 140, in after_return
key = self.get_key(args, kwargs)
File "/home/erik/python/projects/aa-dev/venv/lib/python3.10/site-packages/celery_once/tasks.py", line 129, in get_key
key = queue_once_key(self.name, call_args, restrict_to)
File "/home/erik/python/projects/aa-dev/venv/lib/python3.10/site-packages/celery_once/helpers.py", line 71, in queue_once_key
restrict_kwargs = {key: kwargs[key] for key in restrict_to}
File "/home/erik/python/projects/aa-dev/venv/lib/python3.10/site-packages/celery_once/helpers.py", line 71, in <dictcomp>
restrict_kwargs = {key: kwargs[key] for key in restrict_to}
KeyError: 'alpha'
This should at least be mentioned in the README or better yet it should be implemented.
When we have a task like this:
And you call the task without the optional argument like this:
You get an error in celery_once. Apparently, optional arguments are not supported in this context.
This should at least be mentioned in the README or better yet it should be implemented.