Skip to content

Conversation

@monorkin
Copy link
Contributor

Hi! I ran into what I think is a typo today that confused me for a minute.

After accidentally deploying an invalid job config in recurring.yml:

  incineration:
    job: Account::IncinerateDueJob # <- invalid "job" key
    schedule: every 8 hours at minute 16

I got this error message when SolidQueue tried to boot:

Invalid recurring tasks:
- incineration: either command or class_name must be present
Exiting...

I then changed job to class_name as the error told me to, but that resulted in the same error.

  incineration:
    class_name: Account::IncinerateDueJob # <- still raises "either command or class_name must be present"
    schedule: every 8 hours at minute 16

Only after checking the documentation did I notice that the key should be class instead of class_name

  incineration:
    class: Account::IncinerateDueJob # <- this works
    schedule: every 8 hours at minute 16

This PR changes class_name to be just class in the error message and adds a test for it.

Copy link
Member

@rosa rosa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch! Thanks a lot for fixing 🙏🏻

@rosa rosa merged commit 695683f into rails:main Jan 12, 2026
123 of 128 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants