コード例 #1
0
ファイル: geoserver_logs.py プロジェクト: cholmes/mapstory
def check_geoserver_log():
    logpath = _config["GEOSERVER_LOG"]
    logfile_model = get_logfile_model(logpath)
    with open(logpath) as f:
        result = read_next_sections(f, logfile_model)
        sections = result["sections"]
        logfile_model.offset_start = start = result["offset_start"]
        logfile_model.offset_end = end = result["offset_end"]
        logfile_model.checksum = checksum(sections, start, end)
        logfile_model.save()
    return [subcheck(fn, name, sections) for fn, name in [(_out_of_memory, "Out of Memory")]]
コード例 #2
0
ファイル: geoserver_logs.py プロジェクト: sourada/mapstory
def check_geoserver_log():
    logpath = _config['GEOSERVER_LOG']
    logfile_model = get_logfile_model(logpath)
    with open(logpath) as f:
        result = read_next_sections(f, logfile_model)
        sections = result['sections']
        logfile_model.offset_start = start = result['offset_start']
        logfile_model.offset_end = end = result['offset_end']
        logfile_model.checksum = checksum(sections, start, end)
        logfile_model.save()
    return [subcheck(fn, name, sections)
            for fn, name in [(_out_of_permgen_memory, 'Out of PermGen Memory'),
                             (_out_of_memory, 'Out of heap space')]]
コード例 #3
0
def get_layer_has_latlon_bbox():
    return [subcheck(_check_layer, l.typename, l)
            for l in Layer.objects.all().iterator()]
コード例 #4
0
def get_layer_capabilities():
    return [subcheck(_check_layer_capabilities, l.typename, l)
            for l in Layer.objects.all().iterator()]
コード例 #5
0
def get_layer_has_latlon_bbox():
    return [
        subcheck(_check_layer, l.typename, l)
        for l in Layer.objects.all().iterator()
    ]
コード例 #6
0
def get_layer_capabilities():
    return [
        subcheck(_check_layer_capabilities, l.typename, l)
        for l in Layer.objects.all().iterator()
    ]
コード例 #7
0
def disk_space():
    return [subcheck(check_space_for_path, path, path)
            for path in ('/', '/raid')]