mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-10-31 22:19:00 +00:00
Merge pull request #2957 from hughrun/redisfix
fix illegal values in redis jobs
This commit is contained in:
commit
0f8da5b738
2 changed files with 3 additions and 2 deletions
|
@ -112,7 +112,7 @@ class ActivityStream(RedisStore):
|
||||||
trace.get_current_span().set_attribute("status_privacy", status.privacy)
|
trace.get_current_span().set_attribute("status_privacy", status.privacy)
|
||||||
trace.get_current_span().set_attribute(
|
trace.get_current_span().set_attribute(
|
||||||
"status_reply_parent_privacy",
|
"status_reply_parent_privacy",
|
||||||
status.reply_parent.privacy if status.reply_parent else None,
|
status.reply_parent.privacy if status.reply_parent else status.privacy,
|
||||||
)
|
)
|
||||||
# direct messages don't appear in feeds, direct comments/reviews/etc do
|
# direct messages don't appear in feeds, direct comments/reviews/etc do
|
||||||
if status.privacy == "direct" and status.status_type == "Note":
|
if status.privacy == "direct" and status.status_type == "Note":
|
||||||
|
|
|
@ -254,7 +254,8 @@ def rerank_suggestions_task(user_id):
|
||||||
def rerank_user_task(user_id, update_only=False):
|
def rerank_user_task(user_id, update_only=False):
|
||||||
"""do the hard work in celery"""
|
"""do the hard work in celery"""
|
||||||
user = models.User.objects.get(id=user_id)
|
user = models.User.objects.get(id=user_id)
|
||||||
suggested_users.rerank_obj(user, update_only=update_only)
|
if user:
|
||||||
|
suggested_users.rerank_obj(user, update_only=update_only)
|
||||||
|
|
||||||
|
|
||||||
@app.task(queue=SUGGESTED_USERS)
|
@app.task(queue=SUGGESTED_USERS)
|
||||||
|
|
Loading…
Reference in a new issue