Skip to content

Commit 576bbd2

Browse files
authored
Remove --flush-cache parameter from inventory reconciler (#1828)
This parameter is no longer needed for the reconciler sync command. Removed all related functionality including: - CLI parameter definition in Sync.get_parser() - flush_cache variable assignment in Sync.take_action() - flush_cache parameter from reconciler.run() function - FLUSH_CACHE environment variable logic Depends-on: osism/container-image-inventory-reconciler#458 AI-assisted: Claude Code Signed-off-by: Christian Berendt <[email protected]>
1 parent 850b26c commit 576bbd2

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

osism/commands/reconciler.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,6 @@ def get_parser(self, prog_name):
4343
type=int,
4444
help="Timeout for a scheduled task that has not been executed yet",
4545
)
46-
parser.add_argument(
47-
"--flush-cache",
48-
default=False,
49-
help="Flush cache before running sync",
50-
action="store_true",
51-
)
5246
return parser
5347

5448
def take_action(self, parsed_args):
@@ -57,9 +51,8 @@ def take_action(self, parsed_args):
5751

5852
wait = not parsed_args.no_wait
5953
task_timeout = parsed_args.task_timeout
60-
flush_cache = parsed_args.flush_cache
6154

62-
t = reconciler.run.delay(publish=wait, flush_cache=flush_cache)
55+
t = reconciler.run.delay(publish=wait)
6356
if wait:
6457
logger.info(
6558
f"Task {t.task_id} (sync inventory) is running in background. Output coming soon."

osism/tasks/reconciler.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def setup_periodic_tasks(sender, **kwargs):
2626

2727

2828
@app.task(bind=True, name="osism.tasks.reconciler.run")
29-
def run(self, publish=True, flush_cache=False):
29+
def run(self, publish=True):
3030
# Check if tasks are locked before execution
3131
utils.check_task_lock_and_exit()
3232

@@ -39,8 +39,6 @@ def run(self, publish=True, flush_cache=False):
3939
logger.info("RUN /run.sh")
4040

4141
env = os.environ.copy()
42-
if flush_cache:
43-
env["FLUSH_CACHE"] = "true"
4442

4543
p = subprocess.Popen(
4644
"/run.sh",

0 commit comments

Comments
 (0)