mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-05 02:41:14 -05:00
use click.echo
This commit is contained in:
@@ -590,7 +590,7 @@ def process_row_from_job(job_id, job_row_number):
|
|||||||
|
|
||||||
|
|
||||||
@notify_command(name="download-csv-file-by-name")
|
@notify_command(name="download-csv-file-by-name")
|
||||||
@click.option("-f", "--csv_filename", required=True, help="csv file name")
|
@click.argument("csv_filename")
|
||||||
def download_csv_file_by_name(csv_filename):
|
def download_csv_file_by_name(csv_filename):
|
||||||
|
|
||||||
bucket_name = current_app.config["CSV_UPLOAD_BUCKET"]["bucket"]
|
bucket_name = current_app.config["CSV_UPLOAD_BUCKET"]["bucket"]
|
||||||
@@ -598,9 +598,7 @@ def download_csv_file_by_name(csv_filename):
|
|||||||
secret = current_app.config["CSV_UPLOAD_BUCKET"]["secret_access_key"]
|
secret = current_app.config["CSV_UPLOAD_BUCKET"]["secret_access_key"]
|
||||||
region = current_app.config["CSV_UPLOAD_BUCKET"]["region"]
|
region = current_app.config["CSV_UPLOAD_BUCKET"]["region"]
|
||||||
content = s3.get_s3_file(bucket_name, csv_filename, access_key, secret, region)
|
content = s3.get_s3_file(bucket_name, csv_filename, access_key, secret, region)
|
||||||
# We want it all to get logged in one line
|
click.echo(content)
|
||||||
content = content.replace("\n", "|")
|
|
||||||
print(content)
|
|
||||||
|
|
||||||
|
|
||||||
@notify_command(name="populate-annual-billing-with-the-previous-years-allowance")
|
@notify_command(name="populate-annual-billing-with-the-previous-years-allowance")
|
||||||
|
|||||||
@@ -1349,7 +1349,7 @@ cf run-task notify-api-production --command "flask command download-csv-file-by-
|
|||||||
locally, just do:
|
locally, just do:
|
||||||
|
|
||||||
```
|
```
|
||||||
poetry run flask command download-csv-file-by-name -f <file location in admin logs>
|
poetry run flask command download-csv-file-by-name <file location in admin logs>
|
||||||
```
|
```
|
||||||
|
|
||||||
## Debug steps
|
## Debug steps
|
||||||
|
|||||||
Reference in New Issue
Block a user