Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feed parsing, call update when new entries
- Loading branch information
1 parent
f9147e6
commit 94df9ef
Showing
4 changed files
with
37 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
require 'bundler' | ||
Bundler.require | ||
|
||
require './conda_repo' | ||
require './conda' | ||
|
||
# redis_uri = ENV['REDIS_SERVER'] || 'localhost:6379' | ||
# client = Feedtosis::Client.new('https://repo.anaconda.com/pkgs/rss.xml', | ||
# backend: Moneta.new(:Redis, | ||
# host: URI.parse(redis_uri).host, | ||
# port: URI.parse(redis_uri).port)) | ||
# TODO: do this in next PR | ||
# while(true) do | ||
# new_entries = client.fetch.new_entries | ||
# CocoapodsRepo.new(redis_uri).update_pods if new_entries | ||
# sleep 30 | ||
# end | ||
redis_uri = ENV['REDIS_SERVER'] || 'localhost:6379' | ||
client = Feedtosis::Client.new('http://repo.anaconda.com/pkgs/rss.xml', | ||
backend: Moneta.new(:Redis, | ||
host: URI.parse(redis_uri).host, | ||
port: URI.parse(redis_uri).port)) | ||
loop do | ||
new_entries = client.fetch.new_entries | ||
if new_entries.length | ||
puts "#{new_entries.length} new" | ||
Conda.instance.update_packages | ||
end | ||
sleep 30 | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters