mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-16 20:48:37 -04:00
document create-test-user command
This commit is contained in:
@@ -340,33 +340,6 @@ def update_jobs_archived_flag(start_date, end_date):
|
||||
current_app.logger.info('Total archived jobs = {}'.format(total_updated))
|
||||
|
||||
|
||||
# @notify_command(name='update-emails-to-remove-gsi')
|
||||
# @click.option('-s', '--service_id', required=True, help="service id. Update all user.email_address to remove .gsi")
|
||||
# @statsd(namespace="tasks")
|
||||
# def update_emails_to_remove_gsi(service_id):
|
||||
# users_to_update = """SELECT u.id user_id, u.name, email_address, s.id, s.name
|
||||
# FROM users u
|
||||
# JOIN user_to_service us on (u.id = us.user_id)
|
||||
# JOIN services s on (s.id = us.service_id)
|
||||
# WHERE s.id = :service_id
|
||||
# AND u.email_address ilike ('%.gsi.gov.uk%')
|
||||
# """
|
||||
# results = db.session.execute(users_to_update, {'service_id': service_id})
|
||||
# print("Updating {} users.".format(results.rowcount))
|
||||
|
||||
# for user in results:
|
||||
# print('User with id {} updated'.format(user.user_id))
|
||||
|
||||
# update_stmt = """
|
||||
# UPDATE users
|
||||
# SET email_address = replace(replace(email_address, '.gsi.gov.uk', '.gov.uk'), '.GSI.GOV.UK', '.GOV.UK'),
|
||||
# updated_at = now()
|
||||
# WHERE id = :user_id
|
||||
# """
|
||||
# db.session.execute(update_stmt, {'user_id': str(user.user_id)})
|
||||
# db.session.commit()
|
||||
|
||||
|
||||
@notify_command(name='replay-daily-sorted-count-files')
|
||||
@click.option('-f', '--file_extension', required=False, help="File extension to search for, defaults to rs.txt")
|
||||
@statsd(namespace="tasks")
|
||||
|
||||
Reference in New Issue
Block a user