Merge branch 'main' of ssh://git.buechner.me:2222/nbuechner/ubottu-web

This commit is contained in:
Nils Büchner 2024-07-18 16:40:02 +02:00
commit 17d47ba71f

View file

@ -33,6 +33,7 @@ def fetch_matrix_accounts(profile_id):
matrix_ids.append(matrix_id) matrix_ids.append(matrix_id)
# Cache the result with expiration time of 30 minutes (1800 seconds) # Cache the result with expiration time of 30 minutes (1800 seconds)
cache.setex(f"matrix_{profile_id}", 1800, json.dumps(matrix_ids)) cache.setex(f"matrix_{profile_id}", 1800, json.dumps(matrix_ids))
return matrix_ids
except KeyError as e: except KeyError as e:
print(f"Profule with name {profile_id} was not found. Error: {e}") print(f"Profule with name {profile_id} was not found. Error: {e}")