[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sup-talk] current state of synching upstream?



On Sat, Dec 18, 2010 at 02:21:40PM -0500, Ben Walton wrote:
> Here's my current approach that I've been happy with since I
> implemented it back in the summer:

Cool, this is exactly how I expected it to look like!

> --snip--
> s = "maildir:/path/to/Maildir/.incoming.#{Date.today.strftime("%Y.%m")}"
> 
> unless Redwood::SourceManager.source_for(s)
>   Redwood::Logger.force_message "Adding new source: #{s}"
>   Redwood::SourceManager.add_source Recoverable.new(Redwood::Maildir.new(s))
> end
> --snip--

Neither master nor Damien's Maildir clone contain the class Recoverable.
Is this code you added somewhere else?

The only (conceptual) issue I see with this code that you miss sources
when having more than a month of idleness. Say the suffix of s is
2012.10 and the next time you check back is in December, then you'll
miss 2012.11. Now whether anyone of us has the freedom to not check
email for that long is a different question :-).

> The only downside to this is that my sources.yaml file needs manual
> twiddling at restart to add the sources that were added during
> runtime.

As Tilo mentioned, this is weird indeed since sup calls Index.save which
in turn should call SourceManager.save_sources. I'll look into this when
I get a chance.

   Matthias
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk