asgiref icon indicating copy to clipboard operation
asgiref copied to clipboard

Fix pass callable object to sync_to_async

Open Maillol opened this issue 1 month ago • 1 comments

Fix: Prevent passing callable objects that overwrite context

This fixes a regression where passing a callable object like huey.Task would break the context attribute.

After this change, huey.Task and similar callables can be used without overwriting context, restoring previous behavior.

Maillol avatar Nov 26 '25 15:11 Maillol

Good example @Maillol. This looks right. I'll try and pull a point release together shortly.

carltongibson avatar Nov 27 '25 15:11 carltongibson