Skip to content

Commit

Permalink
add(delete fc command) (#3900)
Browse files Browse the repository at this point in the history
# Description

adding delete flow cell cli command
  • Loading branch information
ChrOertlin authored Oct 30, 2024
1 parent 2c874fb commit b973113
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cg/cli/delete/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from cg.cli.delete.case import delete_case
from cg.cli.delete.cases import delete_cases
from cg.cli.delete.illumina_sequencing_run import delete_illumina_run
from cg.cli.delete.observations import (
delete_available_observations,
delete_observations,
Expand All @@ -25,3 +26,4 @@ def delete():
delete.add_command(delete_cases)
delete.add_command(delete_observations)
delete.add_command(delete_available_observations)
delete.add_command(delete_illumina_run)
26 changes: 26 additions & 0 deletions cg/cli/delete/illumina_sequencing_run.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import click

from cg.constants.cli_options import DRY_RUN
from cg.services.illumina.post_processing.housekeeper_storage import (
delete_sequencing_data_from_housekeeper,
)


@click.command("illumina-run")
@click.argument(
"flow_cell_id",
type=str,
)
@click.pass_context
def delete_illumina_run(context: click.Context, flow_cell_id: str):
"""
Delete an Illumina sequencing run.
Args:
flow_cell_id (str): Give the flow cell id of the run to delete from statusdb and housekeeper.
"""
delete_sequencing_data_from_housekeeper(
flow_cell_id=flow_cell_id,
hk_api=context.obj.housekeeper_api,
)
context.obj.status_db.delete_illumina_flow_cell(internal_id=flow_cell_id)

0 comments on commit b973113

Please sign in to comment.