Skip to content

Instantly share code, notes, and snippets.

@Sixeight
Created October 20, 2012 06:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sixeight/3922429 to your computer and use it in GitHub Desktop.
Save Sixeight/3922429 to your computer and use it in GitHub Desktop.
# coding: utf-8
fetcher = Takeyamachi::Config.platforms.map do |platform|
Takeyamachi::FetcherFactory.create(platform)
end
Forever.run do
before :all do
fetchers.each do |fetcher|
config = Takeyamachi::Config.get(fetcher.platform)
name = config[:name]
pass = config[:pass]
fetcher.login(name, pass)
end
end
every 1.minutes do
fetchers.each do |fetcher|
fetcher.fetche
Takeyamachi::Notifier.notify!(fetcher) if fetcher.notify?
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment