Alihan f6777b1488 Fix critical deadlocks causing API to hang on second job
Fixed two separate deadlock issues preventing job queue from processing
multiple jobs sequentially:

**Deadlock #1: JobQueue lock ordering violation**
- Fixed _calculate_queue_positions() attempting to acquire _jobs_lock
  while already holding _queue_positions_lock
- Implemented snapshot pattern to avoid nested lock acquisition
- Updated submit_job() to properly separate lock acquisitions

**Deadlock #2: JobRepository non-reentrant lock bug**
- Fixed _flush_dirty_jobs_sync() trying to re-acquire _dirty_lock
  while already holding it (threading.Lock is not reentrant)
- Removed redundant lock acquisition since caller already holds lock

Additional improvements:
- Added comprehensive lock ordering documentation to JobQueue class
- Added detailed debug logging throughout job submission flow
- Enabled DEBUG logging in API server for troubleshooting

Testing: Successfully processed 3 consecutive jobs without hanging
2025-10-17 03:51:46 +03:00
2025-03-22 13:40:58 +08:00
2025-06-15 17:50:05 +03:00
Description
A high-performance speech recognition MCP server based on Faster Whisper, providing efficient audio transcription capabilities.
354 KiB
Languages
Python 98.7%
Batchfile 1.3%