<commit_before>"""
This action removes all the zip files from CloudBolt /tmp/systemd-private* directory.
"""
from common.methods import set_progress
import glob
import os

def run(job, *args, **kwargs):
    
    zip_file_list = glob.glob("/tmp/systemd-private*/tmp/*.zip")
    set_progress("Found following zip files in /tmp: {}".format(zip_file_list))
    for file in zip_file_list:
        set_progress("Removing these files {}".format(file))
        os.remove(file)

    return "SUCCESS", "", ""<commit_msg>Remove only those files that were stored 5 minutes ago.<commit_after>"""
This action removes all the zip files from CloudBolt /tmp/systemd-private* directory.
"""
from common.methods import set_progress
import glob
import os
import time

def run(job, *args, **kwargs):
    
    zip_file_list = glob.glob("/tmp/systemd-private*/tmp/*.zip")
    set_progress("Found following zip files in /tmp: {}".format(zip_file_list))
    for file in zip_file_list:
        if os.path.getmtime(file) < time.time() - 5 * 60:
	   set_progress("Removing these files {}".format(file))
           os.remove(file)
    return "SUCCESS", "", ""
{'fraction_non_alphanumeric': 0.13274336283185842, 'fraction_numerical': 0.0035398230088495575, 'mean_word_length': 3.8127659574468087, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '677786', 'n_tokens_mistral': 352, 'n_tokens_neox': 343, 'n_words': 104}