summaryrefslogtreecommitdiffstats
path: root/src/invidious.cr
diff options
context:
space:
mode:
authorsyeopite <syeopite@syeopite.dev>2025-02-26 13:55:25 -0800
committersyeopite <syeopite@syeopite.dev>2025-02-26 13:55:25 -0800
commit4ea4878d1a17bc90223b9fb8449858ba3a9a1125 (patch)
tree0252dfa19b265f0e21b73d195cfdf9d9048fe559 /src/invidious.cr
parent1f0a89fb5ff89b3aeab686bdff656809beb8ed4c (diff)
parent3850739d7f4cd8be4f053fb1cb6775066f225939 (diff)
downloadinvidious-4ea4878d1a17bc90223b9fb8449858ba3a9a1125.tar.gz
invidious-4ea4878d1a17bc90223b9fb8449858ba3a9a1125.tar.bz2
invidious-4ea4878d1a17bc90223b9fb8449858ba3a9a1125.zip
User: Batch notifications together
Diffstat (limited to 'src/invidious.cr')
-rw-r--r--src/invidious.cr5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/invidious.cr b/src/invidious.cr
index b422dcbb..566d4dc9 100644
--- a/src/invidious.cr
+++ b/src/invidious.cr
@@ -192,8 +192,9 @@ if CONFIG.popular_enabled
Invidious::Jobs.register Invidious::Jobs::PullPopularVideosJob.new(PG_DB)
end
-CONNECTION_CHANNEL = ::Channel({Bool, ::Channel(PQ::Notification)}).new(32)
-Invidious::Jobs.register Invidious::Jobs::NotificationJob.new(CONNECTION_CHANNEL, CONFIG.database_url)
+NOTIFICATION_CHANNEL = ::Channel(VideoNotification).new(32)
+CONNECTION_CHANNEL = ::Channel({Bool, ::Channel(PQ::Notification)}).new(32)
+Invidious::Jobs.register Invidious::Jobs::NotificationJob.new(NOTIFICATION_CHANNEL, CONNECTION_CHANNEL, CONFIG.database_url)
Invidious::Jobs.register Invidious::Jobs::ClearExpiredItemsJob.new