Don't add imported statuses to timeline

Imported items are creating a huge number of add_status_task tasks, and
really they don't need to go in to timelines at all.
This commit is contained in:
Mouse Reeve 2022-05-31 13:39:01 -07:00
parent 4c050d0999
commit cf17c3e793

View file

@ -303,6 +303,10 @@ def add_status_on_create_command(sender, instance, created):
) or instance.created_date < instance.published_date - timedelta(days=1):
priority = LOW
# don't add imported statuses to feeds
if models.ImportItem.objects.exists(linked_review=instance):
return
add_status_task.apply_async(
args=(instance.id,),
kwargs={"increment_unread": created},