mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 23:55:58 -05:00
merge from main and code review feedback
This commit is contained in:
@@ -189,51 +189,6 @@ def setup_commands(application):
|
||||
application.cli.add_command(command_group)
|
||||
|
||||
|
||||
# TODO maintainability what is the purpose of this command? Who would use it and why?
|
||||
# COMMENTING OUT UNTIL WE DETERMINE IF WE NEED IT OR NOT
|
||||
# @notify_command(name="rebuild-ft-billing-for-day")
|
||||
# @click.option("-s", "--service_id", required=False, type=click.UUID)
|
||||
# @click.option(
|
||||
# "-d",
|
||||
# "--day",
|
||||
# help="The date to recalculate, as YYYY-MM-DD",
|
||||
# required=True,
|
||||
# type=click_dt(format="%Y-%m-%d"),
|
||||
# )
|
||||
# def rebuild_ft_billing_for_day(service_id, day):
|
||||
|
||||
# """
|
||||
# Rebuild the data in ft_billing for the given service_id and date
|
||||
# """
|
||||
|
||||
# def rebuild_ft_data(process_day, service):
|
||||
# deleted_rows = delete_billing_data_for_service_for_day(process_day, service)
|
||||
# current_app.logger.info(
|
||||
# f"deleted {deleted_rows} existing billing rows for {service} on {process_day}"
|
||||
# )
|
||||
# transit_data = fetch_billing_data_for_day(
|
||||
# process_day=process_day, service_id=service
|
||||
# )
|
||||
# # transit_data = every row that should exist
|
||||
# for data in transit_data:
|
||||
# # upsert existing rows
|
||||
# update_fact_billing(data, process_day)
|
||||
# current_app.logger.info(
|
||||
# f"added/updated {len(transit_data)} billing rows for {service} on {process_day}"
|
||||
# )
|
||||
|
||||
# if service_id:
|
||||
# # confirm the service exists
|
||||
# dao_fetch_service_by_id(service_id)
|
||||
# rebuild_ft_data(day, service_id)
|
||||
# else:
|
||||
# services = get_service_ids_that_need_billing_populated(
|
||||
# get_midnight_in_utc(day), get_midnight_in_utc(day + timedelta(days=1))
|
||||
# )
|
||||
# for row in services:
|
||||
# rebuild_ft_data(day, row.service_id)
|
||||
|
||||
|
||||
@notify_command(name="bulk-invite-user-to-service")
|
||||
@click.option(
|
||||
"-f",
|
||||
@@ -467,32 +422,6 @@ def associate_services_to_organizations():
|
||||
current_app.logger.info("finished associating services to organizations")
|
||||
|
||||
|
||||
# TODO maintainability what is the purpose of this command? Who would use it and why?
|
||||
# COMMENTING OUT UNTIL WE DETERMINE IF WE NEED IT OR NOT
|
||||
# @notify_command(name="populate-service-volume-intentions")
|
||||
# @click.option(
|
||||
# "-f",
|
||||
# "--file_name",
|
||||
# required=True,
|
||||
# help="Pipe delimited file containing service_id, SMS, email",
|
||||
# )
|
||||
# def populate_service_volume_intentions(file_name):
|
||||
# # [0] service_id
|
||||
# # [1] SMS:: volume intentions for service
|
||||
# # [2] Email:: volume intentions for service
|
||||
|
||||
|
||||
# with open(file_name, "r") as f:
|
||||
# for line in itertools.islice(f, 1, None):
|
||||
# columns = line.split(",")
|
||||
# current_app.logger.info(columns)
|
||||
# service = dao_fetch_service_by_id(columns[0])
|
||||
# service.volume_sms = columns[1]
|
||||
# service.volume_email = columns[2]
|
||||
# dao_update_service(service)
|
||||
# current_app.logger.info("populate-service-volume-intentions complete")
|
||||
|
||||
|
||||
@notify_command(name="populate-go-live")
|
||||
@click.option(
|
||||
"-f", "--file_name", required=True, help="CSV file containing live service data"
|
||||
|
||||
Reference in New Issue
Block a user