def get_ajax_job_status_code(jobid):
    """return the job status code (AS A STRING! -- you need to cast the return value as an int if you want to use it as an int)"""
    redis = get_redis()
    # user's browser requesting job status code
    if not validate_jobid(jobid):
        return "%d" % STAT_CODE_INVALID
    r_status_code = get_job_status(redis, jobid)
    if not r_status_code:
        # invalid jobid
        return "%d" % STAT_CODE_INVALID
    else:
        if int(r_status_code) == STAT_CODE_RUNNING:
            check_for_timeout(redis, jobid)
        return get_job_status(redis, jobid)
return the job status code (AS A STRING! -- you need to cast the return value as an int if you want to use it as an int)
app/dalton.py