Skip to content

Commit

Permalink
added purge parameter archive operation
Browse files Browse the repository at this point in the history
  • Loading branch information
xpromache committed Mar 25, 2024
1 parent fdf39b6 commit 7add0bd
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/yamcs/cli/parameter_archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ def __init__(self, parent):
type=str,
help="Stop time",
)
subparser = self.create_subparser(
subparsers, "purge", "Remove all data from the Parameter Archive"

def rebuild(self, args):
opts = utils.CommandOptions(args)
Expand All @@ -38,3 +40,10 @@ def rebuild(self, args):

archive.rebuild_parameter_archive(start=start, stop=stop)
print("Task submitted. It will finish asynchronously.")

def purge(self, args):
opts = utils.CommandOptions(args)
client = YamcsClient(**opts.client_kwargs)
archive = client.get_archive(opts.require_instance())

archive.purge_parameter_archive()

0 comments on commit 7add0bd

Please sign in to comment.