Make WorkflowWebhookWorker usage more mindful (#18831)

This commit is contained in:
Mac Siri 2022-12-13 09:38:02 -05:00 committed by GitHub
parent e63423573c
commit 0d18b092d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -167,7 +167,10 @@ module Feeds
next
end
Slack::WorkflowWebhookWorker.perform_async("Imported #{articles.length} articles for #{user.username}")
if articles.length.positive?
Slack::WorkflowWebhookWorker.perform_async("Imported #{articles.length} articles for #{user.username}")
end
articles
end