instante-social/app/services/activitypub
Claire 9a19227f17
Fix some RedisLocks auto-releasing too fast (#16276)
* Fix Delete and Create-related locks expiring too fast

Fixes #16238

By default, RedisLock expires after 10 seconds, which may not be enough to
process statuses, especially when those have attached media files.

This commit extends those 10 seconds to 15 minutes, which should be plenty
enough to handle any status, while being short enough to not waste many
sidekiq job retries in the exceedingly rare case in which a sidekiq process
would crash when processing a `Create` or `Delete`.

* Fix other RedisLock autorelease durations

Fixes #15645

- things that only perform a few simple database queries (e.g. finding and
  saving a record) have been left unchanged, so they'll still use the default
  10s duration
- things that perform significantly more complex database queries have been
  changed to a 5 minutes timeout
- things that perform multiple HTTP queries have been changed to a 15 minutes
  timeout
2021-05-19 23:52:08 +02:00
..
fetch_featured_collection_service.rb Use Enumerable#filter_map in more places (#15527) 2021-01-22 16:28:15 +01:00
fetch_remote_account_service.rb
fetch_remote_key_service.rb Fix trying to fetch key from empty URI when verifying HTTP signature (#16100) 2021-05-01 23:18:59 +02:00
fetch_remote_poll_service.rb
fetch_remote_status_service.rb
fetch_replies_service.rb
prepare_followers_synchronization_service.rb
process_account_service.rb Fix some RedisLocks auto-releasing too fast (#16276) 2021-05-19 23:52:08 +02:00
process_collection_service.rb Optimize map { ... }.compact calls (#15513) 2021-01-10 00:32:01 +01:00
process_poll_service.rb Optimize map { ... }.compact calls (#15513) 2021-01-10 00:32:01 +01:00
synchronize_followers_service.rb Optimize map { ... }.compact calls (#15513) 2021-01-10 00:32:01 +01:00