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