@@ -256,14 +256,14 @@ def deprecated_config_file_used_notification():
256
256
users = set ()
257
257
258
258
queryset = Project .objects .filter (slug__in = projects ).order_by ("id" )
259
- start_datetime = datetime .datetime .now ()
260
259
for i , project in enumerate (queryset .iterator ()):
261
260
if i % 500 == 0 :
262
261
log .info (
263
262
"Querying all the users we want to contact." ,
264
263
progress = f"{ i } /{ n_projects } " ,
265
264
current_project_pk = project .pk ,
266
265
current_project_slug = project .slug ,
266
+ time_elapsed = (datetime .datetime .now () - start_datetime ).seconds ,
267
267
)
268
268
269
269
users .update (AdminPermission .owners (project ).values_list ("username" , flat = True ))
@@ -282,6 +282,7 @@ def deprecated_config_file_used_notification():
282
282
progress = f"{ i } /{ n_users } " ,
283
283
current_user_pk = user .pk ,
284
284
current_user_username = user .username ,
285
+ time_elapsed = (datetime .datetime .now () - start_datetime ).seconds ,
285
286
)
286
287
287
288
# All the projects for this user that don't have a configuration file
@@ -305,7 +306,7 @@ def deprecated_config_file_used_notification():
305
306
306
307
log .info (
307
308
"Finish sending deprecated config file notifications." ,
308
- notification_seconds = (datetime .datetime .now () - start_datetime ).seconds ,
309
+ time_elapsed = (datetime .datetime .now () - start_datetime ).seconds ,
309
310
)
310
311
311
312
0 commit comments