Extracted run_queue helper from main app