~edwargix/git.sr.ht

b6b184c740d19cd27361efa6056bad6d517af7e2 — Drew DeVault 1 year, 9 months ago c5c1cb9
gitsrht-periodic: drop unsupported timer

This uses an unstable/undocumented part of the Prometheus Python
interface.
1 files changed, 0 insertions(+), 4 deletions(-)

M gitsrht-periodic
M gitsrht-periodic => gitsrht-periodic +0 -4
@@ 42,9 42,6 @@ def gc_git():
            "Packfile size in the gc_git job (B)",
            ["stage"],
            registry=registry)
    gt = Gauge("gitsrht_periodic_gc_git_time",
            "Time spent GCing repositories by the gc_git job",
            registry=registry)

    repos = (Repository.query
            .offset(random.randrange(0, repo_count + 1 - limit))


@@ 53,7 50,6 @@ def gc_git():
        ps.labels("pre").inc(sum(map(lambda p: p.stat().st_size,
            os.scandir(os.path.join(r.path, "objects", "pack")))))

        @Timer(gt.inc)
        def gc():
            subprocess.run(["git", "-C", r.path, "gc", "--quiet"],
                stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)