diff --git a/routes.py b/routes.py index dbf08d9..578c505 100644 --- a/routes.py +++ b/routes.py @@ -327,4 +327,23 @@ def health_check(): 'status': 'healthy', 'timestamp': datetime.now().isoformat(), 'service': 'video-generation-api' - }) \ No newline at end of file + }) + +@api_bp.route('/queue', methods=['GET']) +def status_check(): + """状态检测""" + try: + queue_manager = get_queue_manager() + status = queue_manager.get_queue_status() + queue_running = status['running_task_ids'] + queue_pending = status['waiting_task_ids'] + return jsonify({ + 'queue_running': queue_running, + 'queue_pending': queue_pending + }) + + except Exception as e: + return jsonify({ + 'queue_running': [], + 'queue_pending': [] + }), 500 \ No newline at end of file