【发布时间】:2017-12-02 22:12:17
【问题描述】:
用命令启动sidekiq
bundle exec sidekiq -e production -P /path/to/pid/file/tmp/pids/sidekiq.pid -L /path/to/log/file/shared/log/sidekiq.log --daemon
在日志错误
2017-06-29T06:59:44.776Z 16181 TID-1jr7pg ERROR: CRON JOB: undefined method `to_datetime' for #<EtOrbi::EoTime:0x0000000a933848>
2017-06-29T06:59:44.776Z 16181 TID-1jr7pg ERROR: CRON JOB: /home/user/.rvm/gems/ruby-2.0.0-p247@script-admin/gems/activesupport-3.2.13/lib/active_support/core_ext/date_time/calculations.rb:141:in `<=>'
执行方法/home/user/.rvm/gems/ruby-2.0.0-p247@script-admin/gems/activesupport-3.2.13/lib/active_support/core_ext/date_time/calculations.rb:141:in <=>时出错:
def <=> (other)
super other.kind_of?(Infinity) ? other : other.to_datetime
end
有什么办法可以解决这个问题?
UPD: 将版本 rails 更新为 3.2.22.5 并出现新错误
ERROR: CRON JOB: comparison of Time with EtOrbi::EoTime failed
ERROR: CRON JOB: /home/user/.rvm/gems/ruby-2.0.0-p247@script-admin/gems/sidekiq-cron-0.3.1/lib/sidekiq/cron/job.rb:434:in `<'
在这个地方
def not_enqueued_after?(time)
@last_enqueue_time.nil? || @last_enqueue_time < last_time(time)
end
【问题讨论】:
标签: ruby-on-rails ruby ruby-on-rails-3 cron sidekiq