kopia lustrzana https://dev.funkwhale.audio/funkwhale/funkwhale
fix: Local instance is always reachable to itself
Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2321>pipelines/27771
rodzic
af6fd0911a
commit
934e179d59
|
@ -633,7 +633,12 @@ def fetch_collection(url, max_pages, channel, is_page=False):
|
|||
def check_all_remote_instance_availability():
|
||||
domains = models.Domain.objects.all().prefetch_related()
|
||||
for domain in domains:
|
||||
check_single_remote_instance_availability(domain)
|
||||
if domain == settings.FUNKWHALE_HOSTNAME:
|
||||
# No need to check the instance itself: Its always reachable
|
||||
domain.reachable = True
|
||||
domain.last_successful_contact = timezone.now()
|
||||
else:
|
||||
check_single_remote_instance_availability(domain)
|
||||
|
||||
|
||||
@celery.app.task(name="federation.check_single_remote_instance_availability")
|
||||
|
|
|
@ -1173,7 +1173,9 @@ class LibraryQuerySet(models.QuerySet):
|
|||
)
|
||||
.values_list("target__channel__library", flat=True)
|
||||
)
|
||||
domains_reachable = federation_models.Domain.objects.filter(reachable=True)
|
||||
domains_reachable = federation_models.Domain.objects.filter(
|
||||
reachable=True
|
||||
) | federation_models.Domain.objects.filter(name=settings.FUNKWHALE_HOSTNAME)
|
||||
|
||||
return self.filter(
|
||||
me_query
|
||||
|
|
Ładowanie…
Reference in New Issue