Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fixes schedule:list command to take environment constraints into consideration #52814

Conversation

nikolicaleksa
Copy link

Currently the schedule:list command lists ALL scheduled tasks, regardless if some task is limited to specific environments.

For example, if a user has defined a task that cleans up the data on a test environment, and then checks schedule:list on production, he might think that it would be executed on production as well because it would be listed there with information when the next execution is due.

This can cause confusion / panic so this fix changes the command behaviour so that it only lists tasks which apply to the current environment (unless --all option is used).

@nikolicaleksa nikolicaleksa changed the title fix: Fixes schedule:list command to take environment constraints into… fix: Fixes schedule:list command to take environment constraints into consideration Sep 16, 2024
@taylorotwell
Copy link
Member

There isn't really a fail-safe way to filter this list because any event could have a when callback that has arbitrary constraints, even on environment.

@nikolicaleksa
Copy link
Author

@taylorotwell I was thinking if I should include when in filtering out, but as you said - people can put weird stuff in there. In any case, i think that filtering by environment is still better then doing no filtering at all. This way, at least basic case of environment is covered so I don't see why this should not be done. Can you clarify?

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