2022-10-20 14:05:23 -04:00
|
|
|
# One-off tasks
|
|
|
|
|
|
|
|
|
|
For these, we're using Flask commands, which live in [`/app/commands.py`](../app/commands.py).
|
|
|
|
|
|
2022-11-01 12:14:26 -04:00
|
|
|
This includes things that might be one-time operations! If we're running it on production, it should be a Flask
|
|
|
|
|
command Using a command allows the operation to be tested, both with `pytest` and with trial runs in staging.
|
|
|
|
|
|
|
|
|
|
To see information about available commands, you can get a list with:
|
|
|
|
|
|
|
|
|
|
`pipenv run flask command`
|
|
|
|
|
|
|
|
|
|
Appending `--help` to any command will give you more information about parameters.
|
2022-10-20 14:05:23 -04:00
|
|
|
|
|
|
|
|
To run a command on cloud.gov, use this format:
|
|
|
|
|
|
2022-11-01 12:14:26 -04:00
|
|
|
`cf run-task CLOUD-GOV-APP --commmand "YOUR COMMAND HERE" --name YOUR-COMMAND`
|
2022-10-20 14:05:23 -04:00
|
|
|
|
|
|
|
|
[Here's more documentation](https://docs.cloudfoundry.org/devguide/using-tasks.html) about Cloud Foundry tasks.
|