Skip to content

Unknown field warnings in JobModel #274

Closed
@ruanskybird

Description

@ruanskybird

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:

  1. 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'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions