From 0fa21ea0f00d502c0a3da7af1d659ab2d619ce85 Mon Sep 17 00:00:00 2001 From: hiromi-mi Date: Sat, 30 May 2020 02:28:39 +0900 Subject: [PATCH] push /task/cache_actor_icon at cache_actor_icon() Microblog.pub sometimes writes error log as follows: ``` [ERROR] cache not available for (Icon's Path)/50/Kind.ACTOR_ICON ``` (Maybe) for the sake of caching actor's icon, `_cache_actor_icon()` in `core/activitypub.py` runs `Tasks.cache_actor_icon()`. However, `cache_actor_icon()` in `core/tasks.py` does not run `/tasks/cache_actor_icon`. --- core/tasks.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/tasks.py b/core/tasks.py index 4278fb7..c4f9ca8 100644 --- a/core/tasks.py +++ b/core/tasks.py @@ -35,6 +35,8 @@ class Tasks: if MEDIA_CACHE.is_actor_icon_cached(icon_url): return None + p.push({"icon_url": icon_url, "actor_iri": actor_iri}, "/task/cache_actor_icon") + @staticmethod def cache_emoji(url: str, iri: str) -> None: if MEDIA_CACHE.is_emoji_cached(iri):