Skip to content

Commit

Permalink
only one email summary for all will be sent now after the task
Browse files Browse the repository at this point in the history
  • Loading branch information
frimpongopoku committed Oct 20, 2023
1 parent 9b23471 commit 4c6be29
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/task_queue/database_tasks/media_library_cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ def remove_duplicate_images():
flag = FeatureFlag.objects.filter(key=REMOVE_DUPLICATE_IMAGE_FLAG_KEY).first()
communities = flag.enabled_communities()
task = Task.objects.filter(name = "Media Library Cleanup Routine").first()
for community in communities:
ids = [community.id]
clean_and_notify(ids,community,task.creator)
# for community in communities:
# ids = [community.id]
ids = [c.id for c in communities]
clean_and_notify(ids,None,task.creator)

return "success"

Expand Down

0 comments on commit 4c6be29

Please sign in to comment.