Skip to content

Instantly share code, notes, and snippets.

@czottmann
Created July 29, 2009 12:11
Show Gist options
  • Save czottmann/158087 to your computer and use it in GitHub Desktop.
Save czottmann/158087 to your computer and use it in GitHub Desktop.
namespace :worker do
desc "Start Twitter worker."
task :start_v1 do
run "cd #{current_path} && rake worker:start" # funktioniert nicht
end
desc "Start Twitter worker."
task :start_v2 do
run "cd #{current_path} && ./script/runner ./jobs/twitter_fetcher.rb &" # funktioniert nicht
end
desc "Start Twitter worker."
task :start_v3 do
run "cd #{current_path} && nohup ./script/runner ./jobs/twitter_fetcher.rb &" # funktioniert nicht
end
desc "Stop Twitter worker."
task :stop do
run "cd #{current_path} && rake worker:stop" # funktioniert
end
end
namespace :worker do
desc "Start Twitter worker"
task :start do
system("./script/runner ./jobs/twitter_fetcher.rb &")
end
desc "Stop Twitter worker"
task :stop do
system("touch ./tmp/stop_worker.txt")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment