mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
stop instances from being flagged as 'gone forever' if they're still sending activities
This commit is contained in:
parent
92de06a9be
commit
ade07d2658
2 changed files with 3 additions and 1 deletions
|
@ -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'
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue