fix 500s
This commit is contained in:
parent
9f84f60d55
commit
49c59ea641
5 changed files with 6 additions and 4 deletions
|
@ -17,7 +17,7 @@ MIN_DAYS_FOR_PERIOD = 6
|
|||
|
||||
@JobManager.register
|
||||
class DiscoverGenerator(BaseJob):
|
||||
interval = timedelta(hours=3)
|
||||
interval = timedelta(hours=2)
|
||||
|
||||
def get_popular_marked_item_ids(self, category, days, exisiting_ids):
|
||||
item_ids = [
|
||||
|
|
|
@ -498,9 +498,10 @@ def share_mark(mark):
|
|||
if user.preference.mastodon_append_tag
|
||||
else ""
|
||||
)
|
||||
site = MastodonApplication.objects.filter(domain_name=user.mastodon_site).first()
|
||||
stars = rating_to_emoji(
|
||||
mark.rating_grade,
|
||||
MastodonApplication.objects.get(domain_name=user.mastodon_site).star_mode,
|
||||
site.star_mode if site else 0,
|
||||
)
|
||||
content = f"{mark.action_label}《{mark.item.display_title}》{stars}\n{mark.item.absolute_url}\n{mark.comment_text or ''}{tags}"
|
||||
update_id = None # get_status_id_by_url(mark.shared_link)
|
||||
|
|
|
@ -11,6 +11,7 @@ from mastodon.models import MastodonApplication
|
|||
|
||||
@JobManager.register
|
||||
class MastodonSiteCheck(BaseJob):
|
||||
interval = timedelta(days=1)
|
||||
max_unreachable_days = 31
|
||||
|
||||
def run(self):
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<a href="{{ activity.owner.url }}" class="nickname">{{ activity.owner.display_name }}</a>
|
||||
</span>
|
||||
<span>
|
||||
<a href="{{ activity.owner.url }}" class="handler">{{ activity.owner.handler }}</a>
|
||||
<a href="{{ activity.owner.url }}" class="handler">{{ activity.owner.full_handle }}</a>
|
||||
</span>
|
||||
</div>
|
||||
{% with "activity/"|add:activity.template|add:".html" as template %}
|
||||
|
|
|
@ -217,7 +217,7 @@ class Takahe:
|
|||
@staticmethod
|
||||
def get_following_request_ids(identity_pk: int):
|
||||
targets = Follow.objects.filter(
|
||||
source_id=identity_pk, state="pending_approval"
|
||||
source_id=identity_pk, state__in=["unrequested", "pending_approval"]
|
||||
).values_list("target", flat=True)
|
||||
return list(targets)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue