Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Circular dependency when running with clockworkd daemon #47

Open
manoelneto opened this issue Jul 23, 2018 · 0 comments
Open

Circular dependency when running with clockworkd daemon #47

manoelneto opened this issue Jul 23, 2018 · 0 comments

Comments

@manoelneto
Copy link

manoelneto commented Jul 23, 2018

Rails 4.1.9

/Users/manoelquirino/.rbenv/versions/2.2.2/gemsets/facebook_crawler/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:478:in `load_missing_constant': Circular dependency detected while autoloading constant AdPost (RuntimeError)

My clock.rb

require_relative 'config/boot'
require_relative 'config/environment'

require 'clockwork'

include Clockwork

configure do |config|
  config[:tz] = 'America/Recife'
end

every 1.minute, "NewCrawlerFetchNewPostsWorker" do
  NewCrawlerFetchNewPostsWorker.perform_async
end

every 1.minute, "GetPmsCrawlWorker" do
  GetPmsCrawlWorker.perform_async
end

every 1.minute, "GetCrawlPostsWorker" do
  GetCrawlPostsWorker.perform_async
end

every 1.minute, "GetTwitterCrawlWorker" do
  GetTwitterCrawlWorker.perform_async
end

every 1.minute, "GetCrawlWorker" do
  GetCrawlWorker.perform_async
end

every 1.minute, "NewCrawlerCollectPostsFromRedisWorker" do
  NewCrawlerCollectPostsFromRedisWorker.perform_async
end

every 1.minute, "RefreshAdCronWorker" do
  RefreshAdCronWorker.perform_async
end

every 1.minute, "AdUserControllerWorker" do
  AdUserControllerWorker.perform_async
end

every 30.minutes, "NewCrawlerPushCollectPostsToRedisWorker" do
  NewCrawlerPushCollectPostsToRedisWorker.perform_async
end

When I do clockwork clock.rb, works properly.
But when I do clockworkd run, appear this Circular dependecy error.

Tried to run with bundle, no success at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant