Spaces:
Running
on
Zero
Running
on
Zero
get_active_task_orderをprocessingを省く
Browse files
app.py
CHANGED
@@ -216,7 +216,8 @@ def task_status(task_id):
|
|
216 |
return jsonify({'error': 'Task not found'}), 404
|
217 |
|
218 |
def get_active_task_order(task_id):
|
219 |
-
|
|
|
220 |
|
221 |
# get_task_orderイベントハンドラー
|
222 |
@app.route('/get_task_order/<task_id>', methods=['GET'])
|
|
|
216 |
return jsonify({'error': 'Task not found'}), 404
|
217 |
|
218 |
def get_active_task_order(task_id):
|
219 |
+
non_processing_tasks = [tid for tid, task in active_tasks.items() if not task.is_processing]
|
220 |
+
return non_processing_tasks.index(task_id) if task_id in non_processing_tasks else None
|
221 |
|
222 |
# get_task_orderイベントハンドラー
|
223 |
@app.route('/get_task_order/<task_id>', methods=['GET'])
|