On Tue, Dec 11, 2012 at 01:26:32PM -0800, Iuri G. wrote:
>
> I have came across two issues with ruote-sequel gem (I am using latest
> available (2.3)).
>
> First problem (with solution) is sequel helpers around symbols (e.g.:
> :ide.desc, :rev.asc, :doc.like()). Some of those helpers are coming into
> conflict with similar helpers from mongoid gem (latest version). Mongoid
> tends to load after ruote-sequel thus breaking ruote-sequel. I looked into
> sequel gem and they were planning to deprecate those helpers (core
> extensions) because of those possible conflicts. Sequel recommends using
> explicit methods such as ::Sequel.desc(:ide) instead of :ide.desc to avoid
> conflict. I refactored ruote-sequel storage and it looks like it works
> perfectly. I can make a pull request if you think that's a good change.

Hello Iuri,

thanks for investigating the complete issue. Yes, a pull request would be
much appreciated. Thanks in advance! Happy to move away from :ide.desc.

> Second problem is little bit confusing for me. I have a long running
> participant and I was trying to update some keys on workitem.fields so i
> can have up to date info when i query it or look at it through ruote-kit.
> Basically inside my storage participant i execute this code:
>
> workitem.fields['count'] = count
> RuoteKit.engine.storage_participant.update(workitem)
>
> and it causes following error - Mysql2::Error: Duplicate entry
> 'wi!0_0_0!2a47f32a42f21dc7b14938e54cbee024!20121211-2057-dojukupe' for key
> 'PRIMARY'
> I monkey patched do_insert in ruote-sequel so i can log errors if they
> happen (basically wrapped it with begin ... rescue log(e); raise(e). i
> still raise the error which ruote handles internally and doesnt cause
> anything to go wrong. and the workitem does not get updated.
> My confusion is around that duplicate error. it looks like nothing bad
> happens, except that i dont get updated data in mysql. Is that by design?
> is there a different way to update some values on workitem while it is
> still being consumed? To make clear it is not a human participant. it runs
> for an hour and it gets consumed. What im trying to do is update some
> values on it while its in the process of being consumed,

OK, I'll try to come up with a small test case, you'll tell me if it matches
your situation and we'll work up a solution. Give me a few hours.

Thanks!

--
John Mettraux - http://lambda.io/jmettraux

-- 
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