def number_waiting_on_queue(job_type): num = get_sql_answer(db, "select count(*) from {} where started is null".format(table_name(job_type))) return num