@@ -35,15 +35,15 @@ def add_arguments(self, parser):
3535
3636 def handle (self , * args , ** options ):
3737 try :
38- logger .info ("Create Appointments Command started" )
38+ logger .info ("Create Appointments command started" )
3939 container_client = BlobStorage ().find_or_create_container (
4040 os .getenv ("BLOB_CONTAINER_NAME" )
4141 )
4242 for blob in container_client .list_blobs (
4343 name_starts_with = options ["date_str" ]
4444 ):
4545 blob_client = container_client .get_blob_client (blob .name )
46- logger .debug (f "Processing blob { blob .name } " )
46+ logger .debug ("Processing blob %s" , blob .name )
4747 blob_content = blob_client .download_blob (
4848 max_concurrency = 1 , encoding = "ASCII"
4949 ).readall ()
@@ -60,11 +60,13 @@ def handle(self, *args, **options):
6060 row , clinic
6161 )
6262 logger .info (
63- f" { appt } { ' created' if appt_created else ' updated' } "
63+ "%s %s" , appt , ( " created" if appt_created else " updated" )
6464 )
6565
66- self .stdout .write (f"Processed { len (data_frame )} rows from { blob .name } " )
66+ logger .info ("Processed %s rows from %s" , len (data_frame ), blob .name )
67+ logger .info ("Create Appointments command finished successfully" )
6768 except Exception as e :
69+ logger .error (e , exc_info = True )
6870 raise CommandError (e )
6971
7072 def is_not_holding_clinic (self , row ):
0 commit comments