Class: InsightsCloud::Async::InsightsScheduledSync
  
  
  
  
  
    - Inherits:
 
    - 
      Actions::EntryAction
      
        
          - Object
 
          
            - Actions::EntryAction
 
          
            - InsightsCloud::Async::InsightsScheduledSync
 
          
        
        show all
      
     
  
  
  
  
  
  
  
      - Includes:
 
      - Actions::RecurringAction, ForemanInventoryUpload::Async::DelayedStart
 
  
  
  
  
  
  
    - Defined in:
 
    - lib/insights_cloud/async/insights_scheduled_sync.rb
 
  
  
 
  Constant Summary
  
  
  ForemanInventoryUpload::Async::DelayedStart::START_WINDOW
  
    
      Instance Method Summary
      collapse
    
    
  
  
  
  
  
  
  
  
  
  
  #after_delay, #humanized_name
  
  
  
  
    Instance Method Details
    
      
  
  
    #logger  ⇒ Object 
  
  
  
  
    
      
29
30
31 
     | 
    
      # File 'lib/insights_cloud/async/insights_scheduled_sync.rb', line 29
def logger
  action_logger
end 
     | 
  
 
    
      
  
  
    #plan  ⇒ Object 
  
  
  
  
    
      
7
8
9
10
11
12
13
14
15
16
17
18
19 
     | 
    
      # File 'lib/insights_cloud/async/insights_scheduled_sync.rb', line 7
def plan
  unless Setting[:allow_auto_insights_sync]
    logger.debug(
      'The scheduled process is disabled due to the "allow_auto_insights_sync"
      setting being set to false.'
    )
    return
  end
  after_delay do
    plan_full_sync
  end
end
     | 
  
 
    
      
  
  
    #plan_full_sync  ⇒ Object 
  
  
  
  
    
      
21
22
23 
     | 
    
      # File 'lib/insights_cloud/async/insights_scheduled_sync.rb', line 21
def plan_full_sync
  plan_action(InsightsFullSync, Organization.unscoped.all)
end 
     | 
  
 
    
      
  
  
    #rescue_strategy_for_self  ⇒ Object 
  
  
  
  
    
      
25
26
27 
     | 
    
      # File 'lib/insights_cloud/async/insights_scheduled_sync.rb', line 25
def rescue_strategy_for_self
  Dynflow::Action::Rescue::Fail
end 
     |