llama dev clean

Clean up the LLAMA output directory, rotating out-of-date auxilliary files out of the way and archiving them on remote storage and setting event flag values for matching events to the values specified in --flags. You will need to specify a pattern for matching events that need to be cleaned using the run positional argument and the --downselect flag (see llama run -h help documentation for details); for example, you can match events created more than 86400 seconds ago with --downselect sec_since_v0_gt=86400 to clean up test events older than a day.

usage: llama dev clean [-h] [--dry-run-dirs] [--downselect DOWNSELECT]
                       [--print-downselections]
                       [--flags [FLAGNAME=value [FLAGNAME=value ...]]]
                       [--flag-presets] [--dry-run-flags] [-l LOGFILE]
                       [-v {debug,info,warning,error,critical,none}]
                       [--repeat REPEAT] [--dry-run] [--testevents]
                       [--test-archive-dir TEST_ARCHIVE_DIR]
                       [run]

Named Arguments

--flags

A single flag preset (see: llama.flags) to use (print choices with --flag-presets) in --outdir OR individual flag settings in the format FLAGNAME=value. YOU SHOULD PROBABLY USE A PRESET rather than individual flag settings. Any omitted flags will take on the default values in DEFAULT_FLAGS. If you don’t specify --flags, you’ll be prompted to provide one; just provide --flags with no arguments to accept the default/existing flags. Flags are used to set overall behaviors for an event and set intentions, e.g. to mark an event as “ONLINE” and therefore allowed to communicate with partner web APIs and send out products and alerts. Flag name options and default values (for new events) are FlagPreset({‘UPLOAD’: ‘false’, ‘ROLE’: ‘test’, ‘ICECUBE_UPLOAD’: ‘false’, ‘VETOED’: ‘false’, ‘MANUAL’: ‘false’, ‘ONLINE’: ‘true’, ‘BLINDED_NEUTRINOS’: ‘false’}); the full set of allowed values is (‘true’, ‘false’) for UPLOAD, (‘true’, ‘false’) for BLINDED_NEUTRINOS, (‘true’, ‘false’) for ICECUBE_UPLOAD, (‘test’, ‘observation’) for ROLE, (‘true’, ‘false’) for MANUAL, (‘true’, ‘false’) for VETOED, and (‘true’, ‘false’) for ONLINE.

--flag-presets

Print available flag presets.

--dry-run-flags

Print flags parsed by the CLI and exit.

Default: False

--repeat

If provided, run again every REPEAT seconds.

--dry-run

If provided, don’t actually do anything; just log what would be done.

Default: False

--testevents

Clean up matching event files created by GCN listeners, LVAlert listeners, and the like and move them to --test-archive-dir.

Default: False

--test-archive-dir

The destination directory for archived events if --testevents is specified. (default: /root/.local/share/llama/test_event_archive)

Default: “/root/.local/share/llama/test_event_archive”

filter runs and events (see: ``llama.run``)

run

A pattern specifying a list of directories to update of the form /run/directory/event*glob. See end of llama run -h documentation for details. (default: /root/.local/share/llama/current_run/*

--dry-run-dirs

Print the runs and event directories that would be affected and exit without taking further action.

Default: False

--downselect

Arguments to pass to the downselect method of runs selected by the run argument (note that eventid_filter is already implicitly set by the glob pattern specified in run). Arguments will only be parsed as booleans (if they equal “True” or “False”), ints (if they can be parsed as such), floats (if they can be parsed as such), or strings and should be separated by commas, e.g. --downselect manual=False,fhnameexists=PAstro. Omit a list of downselections or provide an empty string to specify no further downselections beyond the one implied by the run argument. (default: None)

--print-downselections

Print available downselections.

logging settings

-l, --logfile

File where logs should be written. By default, all logging produced by llama run goes to both an archival logfile shared by all instances of the process as well as STDERR. The archival logfile can be overridden with this argument. If you specify /dev/null or a path that resolves to the same, logfile output will be suppressed automatically. Logs written to the logfile are always at maximum verbosity, i.e. DEBUG. (default: /root/.local/share/llama/logs/llama.dev.clean.log)

Default: “/root/.local/share/llama/logs/llama.dev.clean.log”

-v, --verbosity

Possible choices: debug, info, warning, error, critical, none

Set the verbosity level at which to log to STDOUT; the --logfile will ALWAYS receive maximum verbosity logs (unless it is completely supressed by writing to /dev/null). Available choices correspond to logging severity levels from the logging library, with the addition of none if you want to completely suppress logging to standard out. (default: info)

Default: “info”