@@ -183,7 +183,7 @@ def insert_inbound_numbers_from_file(file_name):
183183 for line in file :
184184 line = line .strip ()
185185 if line :
186- current_app .logger .info (line )
186+ current_app .logger .debug (line )
187187 db .session .execute (sql , {"uuid" : str (uuid .uuid4 ()), "line" : line })
188188 db .session .commit ()
189189
@@ -228,7 +228,6 @@ def bulk_invite_user_to_service(file_name, service_id, user_id, auth_type, permi
228228 # "send_texts,send_emails,view_activity"
229229 from app .service_invite .rest import create_invited_user
230230
231- current_app .logger .info ("ENTER" )
232231 file = open (file_name )
233232 for email_address in file :
234233 data = {
@@ -239,7 +238,6 @@ def bulk_invite_user_to_service(file_name, service_id, user_id, auth_type, permi
239238 "auth_type" : auth_type ,
240239 "invite_link_host" : current_app .config ["ADMIN_BASE_URL" ],
241240 }
242- current_app .logger .info (f"DATA = { data } " )
243241 with current_app .test_request_context (
244242 path = f"/service/{ service_id } /invite/" ,
245243 method = "POST" ,
@@ -248,12 +246,12 @@ def bulk_invite_user_to_service(file_name, service_id, user_id, auth_type, permi
248246 ):
249247 try :
250248 response = create_invited_user (service_id )
251- current_app .logger .info (f"RESPONSE { response [1 ]} " )
249+ current_app .logger .debug (f"RESPONSE { response [1 ]} " )
252250 if response [1 ] != 201 :
253251 current_app .logger .warning (
254252 f"*** ERROR occurred for email address: { email_address .strip ()} "
255253 )
256- current_app .logger .info (response [0 ].get_data (as_text = True ))
254+ current_app .logger .debug (response [0 ].get_data (as_text = True ))
257255 except Exception :
258256 current_app .logger .exception (
259257 f"*** ERROR occurred for email address: { email_address .strip ()} ." ,
@@ -337,7 +335,6 @@ def boolean_or_none(field):
337335
338336 for line in itertools .islice (f , 1 , None ):
339337 columns = line .split ("|" )
340- current_app .logger .info (columns )
341338 email_branding = None
342339 email_branding_column = columns [5 ].strip ()
343340 if len (email_branding_column ) > 0 :
@@ -439,20 +436,19 @@ def populate_go_live(file_name):
439436 # 6- Contact detail, 7-MOU, 8- LIVE date, 9- SMS, 10 - Email, 11 - Letters, 12 -CRM, 13 - Blue badge
440437 import csv
441438
442- current_app .logger .info ("Populate go live user and date" )
443439 with open (file_name , "r" ) as f :
444440 rows = csv .reader (
445441 f ,
446442 quoting = csv .QUOTE_MINIMAL ,
447443 skipinitialspace = True ,
448444 )
449- current_app .logger .info (next (rows )) # ignore header row
445+ current_app .logger .debug (next (rows )) # ignore header row
450446 for index , row in enumerate (rows ):
451- current_app .logger .info (index , row )
447+ current_app .logger .debug (index , row )
452448 service_id = row [2 ]
453449 go_live_email = row [6 ]
454450 go_live_date = datetime .strptime (row [8 ], "%d/%m/%Y" ) + timedelta (hours = 12 )
455- current_app .logger .info (service_id , go_live_email , go_live_date )
451+ current_app .logger .debug (service_id , go_live_email , go_live_date )
456452 try :
457453 if go_live_email :
458454 go_live_user = get_user_by_email (go_live_email )
@@ -506,13 +502,11 @@ def fix_billable_units():
506502 )
507503 db .session .execute (stmt )
508504 db .session .commit ()
509- current_app .logger .info ("End fix_billable_units" )
510505
511506
512507@notify_command (name = "delete-unfinished-jobs" )
513508def delete_unfinished_jobs ():
514509 cleanup_unfinished_jobs ()
515- current_app .logger .info ("End cleanup_unfinished_jobs" )
516510
517511
518512@notify_command (name = "process-row-from-job" )
@@ -618,7 +612,7 @@ def dump_user_info(user_email_address):
618612 with open ("user_download.json" , "wb" ) as f :
619613 f .write (json .dumps (content ).encode ("utf8" ))
620614 f .close ()
621- current_app .logger .info ("Successfully downloaded user info to user_download.json" )
615+ current_app .logger .debug ("Successfully downloaded user info to user_download.json" )
622616
623617
624618@notify_command (name = "populate-annual-billing-with-defaults" )
0 commit comments