mirror of
https://github.com/iv-org/invidious.git
synced 2024-09-19 18:25:41 +05:30
Compare commits
6 Commits
5ee20fdcea
...
b0bda6b01d
Author | SHA1 | Date | |
---|---|---|---|
|
b0bda6b01d | ||
|
4782a67038 | ||
|
5baaedfa39 | ||
|
4f066e880c | ||
|
b5083a7746 | ||
|
5d0149844f |
7
.github/workflows/build-stable-container.yml
vendored
7
.github/workflows/build-stable-container.yml
vendored
@ -47,9 +47,11 @@ jobs:
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: quay.io/invidious/invidious
|
||||
flavor: |
|
||||
latest=false
|
||||
tags: |
|
||||
type=semver,pattern={{version}}
|
||||
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
|
||||
type=raw,value=latest
|
||||
labels: |
|
||||
quay.expires-after=12w
|
||||
|
||||
@ -71,10 +73,11 @@ jobs:
|
||||
with:
|
||||
images: quay.io/invidious/invidious
|
||||
flavor: |
|
||||
latest=false
|
||||
suffix=-arm64
|
||||
tags: |
|
||||
type=semver,pattern={{version}}
|
||||
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
|
||||
type=raw,value=latest
|
||||
labels: |
|
||||
quay.expires-after=12w
|
||||
|
||||
|
16
CHANGELOG.md
16
CHANGELOG.md
@ -1,5 +1,18 @@
|
||||
# CHANGELOG
|
||||
|
||||
|
||||
## v2.20240825.2 (2024-08-26)
|
||||
|
||||
This releases fixes the container tags pushed on quay.io.
|
||||
Previously, the ARM64 build was released under the `latest` tag, instead of `latest-arm64`.
|
||||
|
||||
### Full list of pull requests merged since the last release (newest first)
|
||||
|
||||
CI: Fix docker container tags ([#4883], by @SamantazFox)
|
||||
|
||||
[#4877]: https://github.com/iv-org/invidious/pull/4877
|
||||
|
||||
|
||||
## v2.20240825.1 (2024-08-25)
|
||||
|
||||
Add patch component to be [semver] compliant and make github actions happy.
|
||||
@ -8,8 +21,9 @@ Add patch component to be [semver] compliant and make github actions happy.
|
||||
|
||||
### Full list of pull requests merged since the last release (newest first)
|
||||
|
||||
Allow manual trigger of release-container build (#4877, thanks @syeopite)
|
||||
Allow manual trigger of release-container build ([#4877], thanks @syeopite)
|
||||
|
||||
[#4877]: https://github.com/iv-org/invidious/pull/4877
|
||||
|
||||
|
||||
## v2.20240825.0 (2024-08-25)
|
||||
|
@ -35,14 +35,21 @@ class Invidious::Jobs::NotificationJob < Invidious::Jobs::BaseJob
|
||||
PG.connect_listen(pg_url, "notifications") { |event| connections.each(&.send(event)) }
|
||||
|
||||
# hash of channels to their videos (id+published) that need notifying
|
||||
to_notify = Hash(String, Set(VideoNotification)).new(->(hash : Hash(String, Set(VideoNotification)), key : String) { hash[key] = Set(VideoNotification).new })
|
||||
to_notify = Hash(String, Set(VideoNotification)).new(
|
||||
->(hash : Hash(String, Set(VideoNotification)), key : String) {
|
||||
hash[key] = Set(VideoNotification).new
|
||||
}
|
||||
)
|
||||
notify_mutex = Mutex.new()
|
||||
|
||||
# fiber to locally cache all incoming notifications (from pubsub webhooks and refresh channels job)
|
||||
spawn do
|
||||
begin
|
||||
loop do
|
||||
notification = notification_channel.receive
|
||||
notify_mutex.lock
|
||||
to_notify[notification.channel_id] << notification
|
||||
notify_mutex.unlock
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -51,8 +58,10 @@ class Invidious::Jobs::NotificationJob < Invidious::Jobs::BaseJob
|
||||
loop do
|
||||
begin
|
||||
LOGGER.debug("NotificationJob: waking up")
|
||||
notify_mutex.lock
|
||||
cloned = to_notify.clone
|
||||
to_notify.clear
|
||||
notify_mutex.unlock
|
||||
|
||||
cloned.each do |channel_id, notifications|
|
||||
if notifications.empty?
|
||||
@ -63,14 +72,16 @@ class Invidious::Jobs::NotificationJob < Invidious::Jobs::BaseJob
|
||||
if CONFIG.enable_user_notifications
|
||||
video_ids = notifications.map { |n| n.video_id }
|
||||
Invidious::Database::Users.add_multiple_notifications(channel_id, video_ids)
|
||||
notifications.each do |n|
|
||||
# Deliver notifications to `/api/v1/auth/notifications`
|
||||
payload = {
|
||||
"topic" => n.channel_id,
|
||||
"videoId" => n.video_id,
|
||||
"published" => n.published.to_unix,
|
||||
}.to_json
|
||||
PG_DB.exec("NOTIFY notifications, E'#{payload}'")
|
||||
PG_DB.using_connection do |conn|
|
||||
notifications.each do |n|
|
||||
# Deliver notifications to `/api/v1/auth/notifications`
|
||||
payload = {
|
||||
"topic" => n.channel_id,
|
||||
"videoId" => n.video_id,
|
||||
"published" => n.published.to_unix,
|
||||
}.to_json
|
||||
conn.exec("NOTIFY notifications, E'#{payload}'")
|
||||
end
|
||||
end
|
||||
else
|
||||
Invidious::Database::Users.feed_needs_update(channel_id)
|
||||
|
Loading…
Reference in New Issue
Block a user