only show post in last 90 days when showing profile
This commit is contained in:
parent
8903281fe5
commit
f46d77d9c0
3 changed files with 6 additions and 4 deletions
|
@ -164,7 +164,7 @@ services:
|
|||
|
||||
neodb-web:
|
||||
<<: *neodb-service
|
||||
command: ${NEODB_VENV:-/neodb-venv}/bin/gunicorn boofilsic.wsgi -w ${NEODB_WEB_WORKER_NUM:-8} --preload --max-requests 2000 --timeout 90 -b 0.0.0.0:8000
|
||||
command: ${NEODB_VENV:-/neodb-venv}/bin/gunicorn boofilsic.wsgi -w ${NEODB_WEB_WORKER_NUM:-8} --preload --max-requests 2000 --timeout 60 -b 0.0.0.0:8000
|
||||
healthcheck:
|
||||
test: ['CMD', 'wget', '-qO/tmp/test', '--header', 'X-Forwarded-Proto: https', 'http://127.0.0.1:8000/nodeinfo/2.0/']
|
||||
depends_on:
|
||||
|
@ -173,7 +173,7 @@ services:
|
|||
|
||||
neodb-web-api:
|
||||
<<: *neodb-service
|
||||
command: ${NEODB_VENV:-/neodb-venv}/bin/gunicorn boofilsic.wsgi -w ${NEODB_API_WORKER_NUM:-4} --preload --max-requests 2000 --timeout 90 -b 0.0.0.0:8000
|
||||
command: ${NEODB_VENV:-/neodb-venv}/bin/gunicorn boofilsic.wsgi -w ${NEODB_API_WORKER_NUM:-4} --preload --max-requests 2000 --timeout 30 -b 0.0.0.0:8000
|
||||
healthcheck:
|
||||
test: ['CMD', 'wget', '-qO/tmp/test', '--header', 'X-Forwarded-Proto: https', 'http://127.0.0.1:8000/nodeinfo/2.0/']
|
||||
depends_on:
|
||||
|
@ -196,7 +196,7 @@ services:
|
|||
|
||||
takahe-web:
|
||||
<<: *neodb-service
|
||||
command: ${TAKAHE_VENV:-/takahe-venv}/bin/gunicorn --chdir /takahe takahe.wsgi -w ${TAKAHE_WEB_WORKER_NUM:-8} --max-requests 2000 --timeout 90 --preload -b 0.0.0.0:8000
|
||||
command: ${TAKAHE_VENV:-/takahe-venv}/bin/gunicorn --chdir /takahe takahe.wsgi -w ${TAKAHE_WEB_WORKER_NUM:-8} --max-requests 2000 --timeout 60 --preload -b 0.0.0.0:8000
|
||||
healthcheck:
|
||||
test: ['CMD', 'wget', '-qO/tmp/test', '--header', 'X-Forwarded-Proto: https', 'http://127.0.0.1:8000/api/v1/instance']
|
||||
depends_on:
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 65f4163e5f6a5b4c4d6af8c9825681d9005189ba
|
||||
Subproject commit 005dc7b61b37ad6f3f4bd2bf4c8b1322a1de8595
|
|
@ -937,9 +937,11 @@ class Takahe:
|
|||
|
||||
@staticmethod
|
||||
def get_recent_posts(author_pk: int, viewer_pk: int | None = None):
|
||||
since = timezone.now() - timedelta(days=90)
|
||||
qs = (
|
||||
Post.objects.exclude(state__in=["deleted", "deleted_fanned_out"])
|
||||
.filter(author_id=author_pk)
|
||||
.filter(published__gte=since)
|
||||
.order_by("-published")
|
||||
)
|
||||
if viewer_pk and Takahe.get_is_following(viewer_pk, author_pk):
|
||||
|
|
Loading…
Add table
Reference in a new issue