Skip to content

Commit

Permalink
Update function names
Browse files Browse the repository at this point in the history
  • Loading branch information
bsmartradio committed Aug 21, 2024
1 parent 66cd17e commit a9ef9b7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions python/lsst/alert/packet/bin/syncAllSchemasToRegistry.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def parse_args():
return parser.parse_args()


def upload_schema(registry_url, subject, schema_registry):
def upload_schemas(registry_url, subject, schema_registry):
"""Parse schema registry and upload all schemas.
"""
for schema_id in schema_registry.known_ids:
Expand All @@ -65,8 +65,8 @@ def upload_schema(registry_url, subject, schema_registry):
print(f"response text={response.text}")


def delete_schema(registry_url, subject):
"""Delete schema and then remake it in import mode"""
def clear_schema_registry_for_import(registry_url, subject):
"""Delete schemas in the registry and then remake it in import mode"""
# Define the URLs
url_mode = f"{registry_url}/mode/{subject}"
url_schemas = f"{registry_url}/subjects/{subject}"
Expand Down Expand Up @@ -122,9 +122,9 @@ def close_schema(registry_url, subject):

def main():
args = parse_args()
delete_schema(args.schema_registry_url, args.subject)
clear_schema_registry_for_import(args.schema_registry_url, args.subject)
schema_registry = lsst.alert.packet.schemaRegistry.SchemaRegistry().all_schemas_from_filesystem()
upload_schema(
upload_schemas(
args.schema_registry_url,
subject=args.subject,
schema_registry=schema_registry
Expand Down

0 comments on commit a9ef9b7

Please sign in to comment.