You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Normal Celery tasks support using kombu to register object types to serialize/deserialize automatically:
fromkombu.utils.jsonimportregister_typefromdjango.db.modelsimportModelfromdjango.appsimportapps# Allow serialization of django models:register_type(
Model,
"model",
lambdao: [o._meta.label, o.pk],
lambdao: apps.get_model(o[0]).objects.get(pk=o[1]),
)
@shared_taskdefmytask(model: Model):
# this will be the restored the objectprint(type(model))
But it seems celery_longterm_scheduler is not taking it into account. Is it possible to add this feature?
Normal Celery tasks support using
kombu
to register object types to serialize/deserialize automatically:But it seems
celery_longterm_scheduler
is not taking it into account. Is it possible to add this feature?kombu
doc: https://docs.celeryq.dev/projects/kombu/en/stable/userguide/serialization.htmlThe text was updated successfully, but these errors were encountered: