Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scan_retention.py doesn't remove *pooled* files #275

Open
derpadoo opened this issue Jul 16, 2021 · 0 comments
Open

scan_retention.py doesn't remove *pooled* files #275

derpadoo opened this issue Jul 16, 2021 · 0 comments
Assignees

Comments

@derpadoo
Copy link
Contributor

Something like

target_files = set()
complete_dir_scans = set()
processed_dir_scans = set()
cancelled_dir_scans = set()
bigdata_analytics_dir_csv_files = set()

for file_base_name in [scan.result_file_base_name, scan.pooled_scan_result_file_base_name]:

    # Grab a list of files from the "target_files" directory.  Will capture any .excluded_targets as well.
    target_files.add(glob.glob(os.path.join(target_files_dir, f"{file_base_name}.*targets")))

    # Grab a list of files from the "complete" directory.
    complete_dir_scans.add(glob.glob(os.path.join(complete_dir, f"{file_base_name}*")))

    # Grab a list of files from the "processed" directory.
    processed_dir_scans.add(glob.glob(os.path.join(processed_dir, f"{file_base_name}*")))

    # Grab a list of files from the "cancelled" directory.
    cancelled_dir_scans.add(glob.glob(os.path.join(cancelled_dir, f"{file_base_name}*")))

    # Grab a list of .csv files from the "for_bigdata_analytics" directory.
    bigdata_analytics_dir_csv_files.add(glob.glob(
        os.path.join(bigdata_analytics_dir, f"{file_base_name}.csv")
    ))
@derpadoo derpadoo self-assigned this Jul 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant