mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
disable problematic federation code #201
This commit is contained in:
parent
49a4ef3b4e
commit
b61f467049
2 changed files with 5 additions and 5 deletions
|
@ -323,7 +323,7 @@ CELERYD_LOG_LEVEL=INFO
|
||||||
|
|
||||||
# Path to celery binary, that is in your virtual environment
|
# Path to celery binary, that is in your virtual environment
|
||||||
CELERY_BIN=/home/rimu/pyfedi/venv/bin/celery
|
CELERY_BIN=/home/rimu/pyfedi/venv/bin/celery
|
||||||
CELERYD_OPTS="--autoscale=5,1"
|
CELERYD_OPTS="--autoscale=5,1 --max-tasks-per-child=1000"
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Enable and start background services
|
#### Enable and start background services
|
||||||
|
|
|
@ -757,8 +757,8 @@ def process_inbox_request(request_json, activitypublog_id, ip_address):
|
||||||
# Lemmy can send Announce/Update without ever sending an Announce/Create
|
# Lemmy can send Announce/Update without ever sending an Announce/Create
|
||||||
# presumably happens with quick edits after creation (e.g. https://midwest.social/post/13348959)
|
# presumably happens with quick edits after creation (e.g. https://midwest.social/post/13348959)
|
||||||
# Pretend this activity was the Create, and try again.
|
# Pretend this activity was the Create, and try again.
|
||||||
request_json['object']['type'] = 'Create'
|
#request_json['object']['type'] = 'Create'
|
||||||
process_inbox_request(request_json, activitypublog_id, ip_address)
|
#process_inbox_request(request_json, activitypublog_id, ip_address)
|
||||||
elif request_json['object']['object']['type'] == 'Note':
|
elif request_json['object']['object']['type'] == 'Note':
|
||||||
reply = PostReply.query.filter_by(ap_id=request_json['object']['object']['id']).first()
|
reply = PostReply.query.filter_by(ap_id=request_json['object']['object']['id']).first()
|
||||||
if reply:
|
if reply:
|
||||||
|
@ -772,8 +772,8 @@ def process_inbox_request(request_json, activitypublog_id, ip_address):
|
||||||
else:
|
else:
|
||||||
activity_log.exception_message = 'PostReply not found'
|
activity_log.exception_message = 'PostReply not found'
|
||||||
# As with Update/Page, pretend this activity was the Create, and try again.
|
# As with Update/Page, pretend this activity was the Create, and try again.
|
||||||
request_json['object']['type'] = 'Create'
|
#request_json['object']['type'] = 'Create'
|
||||||
process_inbox_request(request_json, activitypublog_id, ip_address)
|
#process_inbox_request(request_json, activitypublog_id, ip_address)
|
||||||
elif request_json['object']['type'] == 'Undo':
|
elif request_json['object']['type'] == 'Undo':
|
||||||
if request_json['object']['object']['type'] == 'Like' or request_json['object']['object']['type'] == 'Dislike':
|
if request_json['object']['object']['type'] == 'Like' or request_json['object']['object']['type'] == 'Dislike':
|
||||||
activity_log.activity_type = request_json['object']['object']['type']
|
activity_log.activity_type = request_json['object']['object']['type']
|
||||||
|
|
Loading…
Add table
Reference in a new issue