Add FASP follow recommendation support (#34964)

This commit is contained in:
David Roetzel 2025-06-16 12:43:27 +02:00 committed by GitHub
commit b2506478ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 136 additions and 0 deletions

View file

@ -22,6 +22,10 @@ class AsyncRefresh
new(redis_key)
end
def self.exists?(redis_key)
redis.exists?(redis_key)
end
attr_reader :status, :result_count
def initialize(redis_key)
@ -49,6 +53,11 @@ class AsyncRefresh
@status = 'finished'
end
def increment_result_count(by: 1)
redis.hincrby(@redis_key, 'result_count', by)
fetch_data_from_redis
end
def reload
fetch_data_from_redis
self