remove caching on stats route
This commit is contained in:
parent
9f14b166dd
commit
b051f8dd6b
|
@ -31,4 +31,5 @@ class SemaphoreCheckerThread(Thread):
|
|||
self.values.append(0)
|
||||
self.prev_semaphore_value = current_semaphore_value
|
||||
proompters_1_min = sum(self.values)
|
||||
# print(proompters_1_min)
|
||||
time.sleep(1)
|
||||
|
|
|
@ -14,8 +14,8 @@ from ...llm.info import get_running_model
|
|||
|
||||
|
||||
@bp.route('/stats', methods=['GET'])
|
||||
@cache.cached(timeout=5, query_string=True)
|
||||
@cache_control(5)
|
||||
# @cache.cached(timeout=5, query_string=True)
|
||||
# @cache_control(5)
|
||||
def get_stats():
|
||||
model_list = get_running_model() # will return False when the fetch fails
|
||||
if isinstance(model_list, bool):
|
||||
|
@ -23,6 +23,8 @@ def get_stats():
|
|||
else:
|
||||
online = True
|
||||
|
||||
# print('-->', proompters_1_min)
|
||||
|
||||
return jsonify({
|
||||
'stats': {
|
||||
'proompters_now': opts.concurrent_gens - concurrent_semaphore._value,
|
||||
|
|
Reference in New Issue