This commit is contained in:
Cyberes 2023-10-04 12:42:18 -06:00
parent 1b21cb69c1
commit 95d781725e
3 changed files with 1 additions and 4 deletions

View File

@ -50,7 +50,7 @@ class RedisPriorityQueue:
b = self.redis.hget('queued_ip_count', item[1]) b = self.redis.hget('queued_ip_count', item[1])
self.decrement_ip_count(client_ip, 'queued_ip_count') self.decrement_ip_count(client_ip, 'queued_ip_count')
a = self.redis.hget('queued_ip_count', item[1]) a = self.redis.hget('queued_ip_count', item[1])
print(item[1], a, b) print(item[1], a, b)
return item return item

View File

@ -52,7 +52,6 @@ def moderation_worker():
_, categories = check_moderation_endpoint(msg) _, categories = check_moderation_endpoint(msg)
redis_moderation.rpush('queue:flagged_categories', json.dumps((tag, categories))) redis_moderation.rpush('queue:flagged_categories', json.dumps((tag, categories)))
except: except:
print(result)
traceback.print_exc() traceback.print_exc()
continue continue

View File

@ -97,8 +97,6 @@ create_db()
@app.route('/api/openai') @app.route('/api/openai')
@flask_cache.cached(timeout=10) @flask_cache.cached(timeout=10)
def home(): def home():
print(len(priority_queue))
base_client_api = redis.get('base_client_api', dtype=str) base_client_api = redis.get('base_client_api', dtype=str)
stats = generate_stats() stats = generate_stats()
model_choices, default_model = get_model_choices() model_choices, default_model = get_model_choices()