On Fri, Nov 12, 2010 at 02:31:24PM -0800, I. E. Smith-Heisters wrote:
> On Nov 12, 11:45 am, "I. E. Smith-Heisters" <[email protected]> wrote:
> >
> > I'm trying to migrate to a composite storage using CouchDB for history
> > and workitems, and Redis for everything else. It's been working great
> > in testing. I implemented some monkey patches to CompositeStorage,
> > partly to get it to work with other enhancements, but also because
> > there were some bugs in #add_type (ie. it didn't exist), #delete, and
> > #reservehttps://gist.github.com/570681#file_ruote_couch_ext.rb.
> 
> Digging into the ruote-redis code, get_many is pulling out the
> revision key along with the document keys with `keys = "#{type}/*"`.
> The revision key is "schedules/at-0_1_0!0466902073001!20101112-
> bogafuhetzu-20101119192248", and the actual schedule is at "schedules/
> at-0_1_0!0466902073001!20101112-bogafuhetzu-20101119192248/1", which
> are both caught by that wildcard key.
> 
> The unit tests pass, but they don't appear to cover this scenario.
> Adding a test for fetching schedule-type records, I get this a
> failure: https://gist.github.com/674815.
> 
> Unfortunately, I'm unclear why get_many treats schedules and msgs
> differently. It also seems like this would be a pretty obvious bug, so
> I suspect that I have something misconfigured on my side.

Hello Ian,

from 2.1.10 to 2.1.11, ruote-redis has been seriously rewritten because of

  
http://groups.google.com/group/openwferu-users/browse_thread/thread/9ed9d22901c8837/

The 'different treatment' you're seeing with 2.1.10 has been dropped in 2.1.11 :

  
https://github.com/jmettraux/ruote-redis/blob/master/lib/ruote/redis/storage.rb#L197-198

For completeness, let me try to detail the use cases of get_many.

In the case of messages ('msgs'), get_many should get them all, there is work 
to do, let's grab it all.

In the case of schedules ('schedules'), 

  
https://github.com/jmettraux/ruote/blob/ruote2.1/lib/ruote/storage/base.rb#L149-167

it's also a case of "grab them all". As you can see from the commented out code 
there is room for improvement. I went for "grab them all" after fighting with 
one of the storages (I'm stupid, I should have documented that better) over 
schedules that never got picked up by the get_many implementation.

I will try to integrate into 2.1.11 the feedback you gave in your initial email 
(missing add_type and reserve, delete looks OK).


Please tell me if there is anything I can do to help. Your reports have helped 
a lot throughout the year. Many thanks,

-- 
John Mettraux - http://jmettraux.wordpress.com

-- 
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en

Reply via email to