Description
Describe the bug
When running job.delay, the worker always throws the following warnings
2025-06-05 08:32:23,317 WARNING Unknown field args in JobModel
2025-06-05 08:32:23,317 WARNING Unknown field kwargs in JobModel
To Reproduce
Steps to reproduce the behavior:
- Enqueue a job
Expected behavior
The warnings should not show as args and kwargs are known fields
Desktop (please complete the following information):
- OS: macintosh
- python: 3.12
- django: 5.2.1
Additional context
scheduler.redis_models.base.BaseModel has a deserialize method. It filters all the known types of the dataclass, but also excludes _non_serializable_fields from the known types. This causes _non_serializable_fields to always be logged as unknown fields, which means all jobs produce these logs. Suggestion is to 'continue' if 'k' is in _non_serializable_fields instead of logging 'Unknown field'.