Skip to content

fix: determine credential generation status from the task expiry - #167

Open
Agrendalath wants to merge 2 commits into
mainfrom
agrendalath/fix-credential-configuration-generation-status
Open

fix: determine credential generation status from the task expiry#167
Agrendalath wants to merge 2 commits into
mainfrom
agrendalath/fix-credential-configuration-generation-status

Conversation

@Agrendalath

Copy link
Copy Markdown
Member

Celery Beat maintains the enabled flag of a periodic task itself - it disables expired tasks and one-off tasks that have already run - so the flag does not reliably reflect the intended configuration.

This adds a CredentialConfiguration.is_generation_enabled property that uses the expires field of the periodic task when it is set, and falls back to the enabled flag otherwise. The credential eligibility endpoint now reports this value.

Celery Beat maintains the `enabled` flag of a periodic task itself - it
disables expired tasks and one-off tasks that have already run - so the
flag does not reliably reflect the intended configuration.

Add a `CredentialConfiguration.is_generation_enabled` property that uses
the `expires` field of the periodic task when it is set, and falls back
to the `enabled` flag otherwise. The credential eligibility endpoint now
reports this value.
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.

1 participant