The getcallargs(self.run, *args, **kwargs) call returns {'args': (), 'kwargs': {'foo': 1, 'bar': 2}}.
The get_key call returns qo_mytask_retry_args-()_kwargs={'bar': 2, 'foo': 1}.
The {'bar': 2, 'foo': 1} part is unsorted and sometimes the order changes to {'foo': 1, 'bar': 2}.
The same issue takes place when a nested dict is passed as task's argument. For example, mytask(foo={'spam': 10, 'eggs': 20}, bar=2). The get_key call returns qo_mytask_foo-{'eggs': 20, 'spam': 10}_bar-2 and sometimes qo_mytask_foo-{'spam': 10, 'eggs': 20}_bar-2
This lead to lock release issues because get_key result is different on lock stage and release stage.
I've discovered a bug in
get_key
method which prevents lock release.The
getcallargs(self.run, *args, **kwargs)
call returns{'foo': 1, 'bar': 2}
. Theget_key
call returnsqo_mytask_foo-1_bar-2
. Everything works properly.If I'd add
autoretry_for
argument:The
getcallargs(self.run, *args, **kwargs)
call returns{'args': (), 'kwargs': {'foo': 1, 'bar': 2}}
. Theget_key
call returnsqo_mytask_retry_args-()_kwargs={'bar': 2, 'foo': 1}
. The{'bar': 2, 'foo': 1}
part is unsorted and sometimes the order changes to{'foo': 1, 'bar': 2}
.The same issue takes place when a nested dict is passed as task's argument. For example,
mytask(foo={'spam': 10, 'eggs': 20}, bar=2)
. Theget_key
call returnsqo_mytask_foo-{'eggs': 20, 'spam': 10}_bar-2
and sometimesqo_mytask_foo-{'spam': 10, 'eggs': 20}_bar-2
This lead to lock release issues because
get_key
result is different on lock stage and release stage.