REFACTOR: Remove logging
This commit is contained in:
@@ -53,7 +53,7 @@ services:
|
|||||||
celery:
|
celery:
|
||||||
build:
|
build:
|
||||||
context: ./web_server
|
context: ./web_server
|
||||||
command: celery -A celery_tasks.celery_app worker --loglevel=info
|
command: celery -A celery_tasks.celery_app worker --loglevel=warning
|
||||||
depends_on:
|
depends_on:
|
||||||
- redis
|
- redis
|
||||||
volumes:
|
volumes:
|
||||||
@@ -66,7 +66,7 @@ services:
|
|||||||
celery_beat:
|
celery_beat:
|
||||||
build:
|
build:
|
||||||
context: ./web_server
|
context: ./web_server
|
||||||
command: celery -A celery_tasks.celery_app beat --loglevel=info
|
command: celery -A celery_tasks.celery_app beat --loglevel=warning
|
||||||
depends_on:
|
depends_on:
|
||||||
- redis
|
- redis
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ def popular_categories(no_categories=4, offset=0) -> list[dict]:
|
|||||||
"""
|
"""
|
||||||
Returns a list of most popular categories
|
Returns a list of most popular categories
|
||||||
"""
|
"""
|
||||||
print(no_categories, offset, flush=True)
|
|
||||||
# Limit the number of categories to 100
|
# Limit the number of categories to 100
|
||||||
if no_categories < 1:
|
if no_categories < 1:
|
||||||
return jsonify([])
|
return jsonify([])
|
||||||
@@ -321,7 +321,7 @@ def update_stream():
|
|||||||
# TODO: Add thumbnails (paths) to table, allow user to update thumbnail
|
# TODO: Add thumbnails (paths) to table, allow user to update thumbnail
|
||||||
|
|
||||||
print("Updating stream info", flush=True)
|
print("Updating stream info", flush=True)
|
||||||
print(request.is_json, flush=True)
|
print(f"request.json: {request.is_json}", flush=True)
|
||||||
|
|
||||||
data = request.get_json()
|
data = request.get_json()
|
||||||
stream_key = data.get("key")
|
stream_key = data.get("key")
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ def user_preferences():
|
|||||||
# If there are any current viewers
|
# If there are any current viewers
|
||||||
if stats:
|
if stats:
|
||||||
stats = json.loads(stats)
|
stats = json.loads(stats)
|
||||||
print(stats, flush=True)
|
|
||||||
with Database() as db:
|
with Database() as db:
|
||||||
# Loop over all users and their currently watching streams
|
# Loop over all users and their currently watching streams
|
||||||
for user_id, stream_ids in stats.items():
|
for user_id, stream_ids in stats.items():
|
||||||
@@ -31,6 +30,4 @@ def user_preferences():
|
|||||||
VALUES (?,?,?)
|
VALUES (?,?,?)
|
||||||
ON CONFLICT(user_id, category_id)
|
ON CONFLICT(user_id, category_id)
|
||||||
DO UPDATE SET favourability = favourability + 1
|
DO UPDATE SET favourability = favourability + 1
|
||||||
""", (user_id, current_category["category_id"], 1))
|
""", (user_id, current_category["category_id"], 1))
|
||||||
data = db.fetchall("SELECT * FROM user_preferences")
|
|
||||||
print(data,flush=True)
|
|
||||||
Reference in New Issue
Block a user