Skip to content

Commit 4fb54f0

Browse files
committed
Keep adding logging :)
1 parent 98941e5 commit 4fb54f0

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

readthedocs/projects/tasks/utils.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -245,16 +245,10 @@ def deprecated_config_file_used_notification():
245245
if build and build.deprecated_config_used():
246246
projects.add(project.slug)
247247

248-
n_projects = len(projects)
249-
log.info(
250-
"Sending deprecated config file notification.",
251-
query_seconds=(datetime.datetime.now() - start_datetime).seconds,
252-
projects=n_projects,
253-
)
254-
255248
# Store all the users we want to contact
256249
users = set()
257250

251+
n_projects = len(projects)
258252
queryset = Project.objects.filter(slug__in=projects).order_by("id")
259253
for i, project in enumerate(queryset.iterator()):
260254
if i % 500 == 0:
@@ -263,6 +257,7 @@ def deprecated_config_file_used_notification():
263257
progress=f"{i}/{n_projects}",
264258
current_project_pk=project.pk,
265259
current_project_slug=project.slug,
260+
users_found=len(users),
266261
time_elapsed=(datetime.datetime.now() - start_datetime).seconds,
267262
)
268263

@@ -278,7 +273,7 @@ def deprecated_config_file_used_notification():
278273
for i, user in enumerate(queryset.iterator()):
279274
if i % 500 == 0:
280275
log.info(
281-
"Querying all the users we want to contact.",
276+
"Sending deprecated config file notification to users.",
282277
progress=f"{i}/{n_users}",
283278
current_user_pk=user.pk,
284279
current_user_username=user.username,

0 commit comments

Comments
 (0)