Skip to content

Commit

Permalink
Fix host deletion task call
Browse files Browse the repository at this point in the history
  • Loading branch information
ShimShtein committed Oct 3, 2023
1 parent d89e11c commit 97d023f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/inventory_sync/async/inventory_scheduled_sync.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def plan
Organization.unscoped.each do |org|
sequence do
plan_org_sync(org)
plan_remove_insights_hosts(org) if Setting[:allow_auto_insights_mismatch_delete]
plan_remove_insights_hosts(org.id) if Setting[:allow_auto_insights_mismatch_delete]
end
end
end
Expand All @@ -30,9 +30,9 @@ def plan_org_sync(org)
plan_action InventoryFullSync, org
end

def plan_remove_insights_hosts
def plan_remove_insights_hosts(org_id)
# plan a remove hosts action with search set to empty (all records)
plan_action(ForemanInventoryUpload::Async::RemoveInsightsHostsJob, '', org.id)
plan_action(ForemanInventoryUpload::Async::RemoveInsightsHostsJob, '', org_id)
end

def logger
Expand Down

0 comments on commit 97d023f

Please sign in to comment.