stop instances from being flagged as 'gone forever' if they're still sending activities

This commit is contained in:
rimu 2024-05-12 16:08:20 +12:00
parent 92de06a9be
commit ade07d2658
2 changed files with 3 additions and 1 deletions

View file

@ -1080,6 +1080,8 @@ def process_inbox_request(request_json, activitypublog_id, ip_address):
user.instance.last_seen = utcnow()
# user.instance.ip_address = ip_address
user.instance.dormant = False
user.instance.gone_forever = False
user.instance.failures = 0
else:
activity_log.exception_message = 'Instance blocked'

View file

@ -656,7 +656,7 @@ def send_to_remote_instance_task(instance_id: int, community_id: int, payload):
instance.failures += 1
instance.most_recent_attempt = utcnow()
instance.start_trying_again = utcnow() + timedelta(seconds=instance.failures ** 4)
if instance.failures > 2:
if instance.failures > 10:
instance.dormant = True
db.session.commit()