Commit 3f8d857f authored by Jochen Sprickerhof's avatar Jochen Sprickerhof Committed by Holger Levsen
Browse files

rdn stats: change output to directory



* Hardcode output filenames.
* Drop temporary file logic as the output is fast enough now.

(cherry picked from commit a18fd51b7448b33e27985b47638e572083be58bf)
Signed-off-by: default avatarHolger Levsen <holger@layer-acht.org>
parent b9016210
Loading
Loading
Loading
Loading
+5 −10
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@
#
# Licensed under GPL-2

from argparse import ArgumentParser, FileType
from argparse import ArgumentParser
from datetime import datetime
from hashlib import file_digest
from os import path
@@ -40,14 +40,9 @@ def main() -> None:
        help="Cache file (will be ignored when this script changes).",
    )
    parser.add_argument(
        "datefile",
        "output_dir",
        type=Path,
        help="Output HTML sorted by build date",
    )
    parser.add_argument(
        "sizefile",
        type=Path,
        help="Output HTML sorted by diffoscope size",
        help="Output path (it will create a index.html and index_size.html there)",
    )
    args = parser.parse_args()
    cx = connect(args.db)
@@ -179,9 +174,9 @@ def main() -> None:
            pass

    db_size = path.getsize(args.db)
    with args.datefile.open("w") as outfile:
    with (args.output_dir / "index.html").open("w") as outfile:
        output(outfile, args.arch, db_size, total, messages_packages, False)
    with args.sizefile.open("w") as outfile:
    with (args.output_dir / "index_size.html").open("w") as outfile:
        output(outfile, args.arch, db_size, total, messages_packages, True)


+1 −1
Original line number Diff line number Diff line
MAILTO=root
42 */3 * * * rebuilderd for arch in all amd64 arm64 armel armhf i386 ppc64el riscv64 ; do mkdir -p /srv/rebuilderd/$arch/stats/ && /srv/jenkins/bin/rebuilderd_stats.py $arch /srv/rebuilderd/$arch/rebuilderd.db --cache /srv/rebuilderd/$arch/stats/cache.pickle /srv/rebuilderd/$arch/stats/index.html.tmp /srv/rebuilderd/$arch/stats/index_date.html.tmp && mv /srv/rebuilderd/$arch/stats/index.html.tmp /srv/rebuilderd/$arch/stats/index.html && mv /srv/rebuilderd/$arch/stats/index_date.html.tmp /srv/rebuilderd/$arch/stats/index_date.html ; done
42 */3 * * * rebuilderd for arch in all amd64 arm64 armel armhf i386 ppc64el riscv64 ; do mkdir -p /srv/rebuilderd/$arch/stats/ && /srv/jenkins/bin/rebuilderd_stats.py $arch /srv/rebuilderd/$arch/rebuilderd.db --cache /srv/rebuilderd/$arch/stats/cache.pickle /srv/rebuilderd/$arch/stats/ ; done
23 0,6,12,18 * * * rebuilderd for arch in all amd64 arm64 armel armhf i386 ppc64el riscv64 ; do /srv/jenkins/bin/rebuilderd_graph.sh $arch ; done