zoukankan      html  css  js  c++  java
  • 开源IDS系列--snorby 2.6.2 undefined method `run_daily_report' for Event:Class (NoMethodError)

    rails runner "Event.run_daily_report"测试邮件配置undefined method `run_daily_report' for Event:Class (NoMethodError)
     
    原因是:snorby2.6.1开始移除了DailyCacheJob,因此需要更换测试方式
     
    新的测试方式:rails r ReportMailer.daily_report.deliver
     
    源自:https://github.com/Snorby/snorby/issues/73
     
    错误及原因解释:
     
    [root@IPS script]# rails runner "Event.run_daily_report"
    Jammit Warning: Asset compression disabled -- Java unavailable.
    /usr/local/rvm/gems/ruby-1.9.3-p551/gems/railties-3.1.12/lib/rails/commands/runner.rb:49:in `eval': undefined method `run_daily_report' for Event:Class (NoMethodError)
    from /usr/local/rvm/gems/ruby-1.9.3-p551/gems/dm-core-1.2.0/lib/dm-core/model/relationship.rb:372:in `method_missing'
    from /usr/local/rvm/gems/ruby-1.9.3-p551/gems/dm-core-1.2.0/lib/dm-core/model/property.rb:249:in `method_missing'
    from (eval):1:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-1.9.3-p551/gems/railties-3.1.12/lib/rails/commands/runner.rb:49:in `eval'
    from /usr/local/rvm/gems/ruby-1.9.3-p551/gems/railties-3.1.12/lib/rails/commands/runner.rb:49:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-1.9.3-p551/gems/railties-3.1.12/lib/rails/commands.rb:63:in `require'
    from /usr/local/rvm/gems/ruby-1.9.3-p551/gems/railties-3.1.12/lib/rails/commands.rb:63:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'
     

     
    Hey Doug,
     
    The DailyCacheJob was remove in 2.6.1. Since we added the ability for user to change their timezone we had to remove the cache roll up that depended on day start/end (the daily cache job). The sensor cache job however is done every 10 mins so it;s easy to build a proper cache for the day based off of that data.
     
    - Dustin

    Dustin Willis Webber

     
     
  • 相关阅读:
    随机性的控制
    856. 括号的分数
    376. 摆动序列(贪心算法)
    XGBoost 安装方法
    1405. 最长快乐字符串(贪心算法)
    1296. 划分数组为连续数字的集合(贪心算法)
    1353. 最多可以参加的会议数目(贪心算法)
    435. 无重叠区间(贪心算法)
    Array-数组-数据结构
    认识Redis和安装
  • 原文地址:https://www.cnblogs.com/phoenix--/p/4953085.html
Copyright © 2011-2022 走看看