2010-02-08 06:35:54 utc |
anb_ |
Hello |
2010-02-08 06:36:01 utc |
jmettraux |
Hello ! |
2010-02-08 07:06:57 utc |
anb_ |
I think I'm having issues correctly registering participants in ruote-kit. Anything's wrong with this config.ru ? http://gist.github.com/297949 |
2010-02-08 07:07:40 utc |
jmettraux |
looks ok |
2010-02-08 07:07:40 utc |
anb_ |
I was trying to register amqp participants but since it didn't work I simplified my config |
2010-02-08 07:07:57 utc |
jmettraux |
"it didn't work" doesn't mean much to me ;) |
2010-02-08 07:07:57 utc |
anb_ |
maybe it's my workflow that is wrong |
2010-02-08 07:08:00 utc |
anb_ |
:) |
2010-02-08 07:08:50 utc |
jmettraux |
what are the symptoms ? |
2010-02-08 07:09:46 utc |
anb_ |
don't see the "puts" in the console and the error count in ruote-kit's process details is 1 |
2010-02-08 07:10:08 utc |
jmettraux |
OK, ruote-couch persistence ? |
2010-02-08 07:10:08 utc |
anb_ |
I should try to get the error message |
2010-02-08 07:10:12 utc |
anb_ |
file system |
2010-02-08 07:10:33 utc |
jmettraux |
it should be visible under errors/ there |
2010-02-08 07:11:09 utc |
jmettraux |
do Kenneth and Torsten have a /errors resource in ruote-kit ? |
2010-02-08 07:11:10 utc |
anb_ |
# |
2010-02-08 07:11:49 utc |
anb_ |
no error resources, that could be an interesting addition |
2010-02-08 07:12:01 utc |
jmettraux |
it's an essential one |
2010-02-08 07:12:15 utc |
jmettraux |
I guess they are too busy on other things |
2010-02-08 07:12:41 utc |
anb_ |
yes, probably. there is workitems, processes and expressions |
2010-02-08 07:13:00 utc |
jmettraux |
ah too bad... |
2010-02-08 07:13:02 utc |
anb_ |
i'm not too familiar with sinatra but I could try to add errors |
2010-02-08 07:13:18 utc |
jmettraux |
let's try to lobby the others first |
2010-02-08 07:13:42 utc |
jmettraux |
in the filesystem, under participants/ |
2010-02-08 07:13:43 utc |
anb_ |
:) |
2010-02-08 07:14:20 utc |
jmettraux |
is there something about myparticipant ? |
2010-02-08 07:15:05 utc |
anb_ |
yes, the ArgumentError |
2010-02-08 07:15:14 utc |
anb_ |
oups |
2010-02-08 07:15:17 utc |
jmettraux |
:) |
2010-02-08 07:15:23 utc |
anb_ |
didn't see your question |
2010-02-08 07:15:24 utc |
anb_ |
:) |
2010-02-08 07:15:57 utc |
anb_ |
only have configurations errors expressions msgs variables |
2010-02-08 07:16:09 utc |
anb_ |
so it doesn't get registered |
2010-02-08 07:16:15 utc |
jmettraux |
yes |
2010-02-08 07:16:49 utc |
jmettraux |
are you using Kenneth's code ? |
2010-02-08 07:18:22 utc |
jmettraux |
ACTION is out for an espresso, back in a few minutes |
2010-02-08 07:18:23 utc |
anb_ |
I pulled from git ... let me try to pull the latest and retry. maybe I got confused and pulled the wrong ruote-kit repo |
2010-02-08 07:18:44 utc |
jmettraux |
http://github.com/kennethkalmer/ruote-kit ? |
2010-02-08 07:23:49 utc |
anb_ |
yes |
2010-02-08 07:24:05 utc |
anb_ |
retried to be sure, still doesn't register |
2010-02-08 07:25:06 utc |
anb_ |
but I think my setup is slowly starting to be gems hell |
2010-02-08 07:25:44 utc |
anb_ |
I got ruote things in local gems and ruote-kit got things in vendor with bundler |
2010-02-08 07:28:27 utc |
anb_ |
Hello kenneth |
2010-02-08 07:34:34 utc |
jmettraux |
back |
2010-02-08 07:34:50 utc |
jmettraux |
that's weird, ok let me have a look at the source |
2010-02-08 07:39:29 utc |
jmettraux |
anb_: when you start your ruote-kit, there are no error messages ? |
2010-02-08 07:39:46 utc |
jmettraux |
there should be two participants registered 'myparticipant' and '.*' |
2010-02-08 07:40:11 utc |
anb_ |
no, no error message |
2010-02-08 07:42:00 utc |
anb_ |
.* is the catchall right ? |
2010-02-08 07:42:04 utc |
jmettraux |
yes |
2010-02-08 07:42:23 utc |
anb_ |
there's no participants folder |
2010-02-08 07:42:35 utc |
jmettraux |
could you please add this right before the participant registration : |
2010-02-08 07:43:05 utc |
jmettraux |
class Ruote::Engine; def register_participant (*args); raise "fail!"; end |
2010-02-08 07:43:08 utc |
jmettraux |
and try again ? |
2010-02-08 07:46:30 utc |
anb_ |
it's getting called |
2010-02-08 07:46:42 utc |
jmettraux |
great |
2010-02-08 07:46:47 utc |
anb_ |
but from the trace it seems to be by use Rack::ShowExceptions |
2010-02-08 07:46:53 utc |
jmettraux |
and now, if you replace that line, with |
2010-02-08 07:47:05 utc |
anb_ |
from /home/anb/ruote-kit/vendor/gems/ruby/1.8/gems/rack-1.1.0/lib/rack/builder.rb:46:in `instance_eval' |
2010-02-08 07:47:20 utc |
jmettraux |
p RuoteKit.engine.storage.class |
2010-02-08 07:47:25 utc |
jmettraux |
what does it output ? |
2010-02-08 07:47:54 utc |
anb_ |
Ruote::FsStorage, twiced |
2010-02-08 07:47:57 utc |
anb_ |
*twice |
2010-02-08 07:48:08 utc |
jmettraux |
twice ? |
2010-02-08 07:48:34 utc |
anb_ |
yes, by register myparticipant and by the catchall probably |
2010-02-08 07:48:44 utc |
anb_ |
( I uncommented the catchall registration ) |
2010-02-08 07:48:48 utc |
kennethkalmer |
hey guys |
2010-02-08 07:49:04 utc |
anb_ |
Hi |
2010-02-08 07:49:14 utc |
jmettraux |
anb_: could gist me that output please ? |
2010-02-08 07:49:33 utc |
jmettraux |
kennethkalmer: hi, we're debugging a ruote-kit issue with participant registration |
2010-02-08 07:49:51 utc |
kennethkalmer |
how can I help ? |
2010-02-08 07:49:54 utc |
anb_ |
http://gist.github.com/297962 |
2010-02-08 07:50:26 utc |
jmettraux |
may I see your current config.ru as well ? |
2010-02-08 07:50:43 utc |
anb_ |
yup, just updated the gist |
2010-02-08 07:50:47 utc |
jmettraux |
kennethkalmer: register_participant seem to have no effect |
2010-02-08 07:51:10 utc |
jmettraux |
http://gist.github.com/297949 |
2010-02-08 07:52:46 utc |
kennethkalmer |
i started working on the participants resource last night |
2010-02-08 07:52:54 utc |
anb_ |
could it be because of my setup ? |
2010-02-08 07:53:04 utc |
anb_ |
bad gem version or something ? |
2010-02-08 07:53:06 utc |
kennethkalmer |
maybe i should wrap that up, it can be our eyes into what is going on |
2010-02-08 07:53:18 utc |
kennethkalmer |
anb_: let me do a quick racksh test this side |
2010-02-08 07:53:28 utc |
jmettraux |
the participants don't get written to fsstorage |
2010-02-08 07:54:37 utc |
jmettraux |
anb_: you should remove lines 31 to 35 now |
2010-02-08 07:54:42 utc |
kennethkalmer |
strange, it did by me |
2010-02-08 07:55:38 utc |
kennethkalmer |
http://gist.github.com/297971 |
2010-02-08 07:56:39 utc |
anb_ |
you're using 1.9.1 and i'm on 1.8.7 |
2010-02-08 07:58:35 utc |
kennethkalmer |
let me do the same on 1.8.7 |
2010-02-08 08:00:26 utc |
kennethkalmer |
jmettraux: http://gist.github.com/297975 |
2010-02-08 08:00:42 utc |
kennethkalmer |
i need something like that for rk's participant resource |
2010-02-08 08:00:46 utc |
kennethkalmer |
that sane ? |
2010-02-08 08:03:06 utc |
jmettraux |
yes |
2010-02-08 08:03:18 utc |
kennethkalmer |
anb_: installing 1.8.7, nuked my rvm installation last night |
2010-02-08 08:03:21 utc |
kennethkalmer |
jmettraux: :) |
2010-02-08 08:03:48 utc |
jmettraux |
from where may I pull ? |
2010-02-08 08:03:56 utc |
kennethkalmer |
let me push quickly |
2010-02-08 08:04:13 utc |
kennethkalmer |
my ruote-kit branch |
2010-02-08 08:04:24 utc |
jmettraux |
ok |
2010-02-08 08:04:25 utc |
kennethkalmer |
pushed |
2010-02-08 08:06:34 utc |
jmettraux |
merged and pushed |
2010-02-08 08:07:16 utc |
kennethkalmer |
arigato :) |
2010-02-08 08:07:24 utc |
jmettraux |
doumo doumo |
2010-02-08 08:09:54 utc |
kennethkalmer |
anb_: 1.8.7 installed, getting gems into position |
2010-02-08 08:13:09 utc |
kennethkalmer |
anb_: http://gist.github.com/297971 |
2010-02-08 08:13:20 utc |
kennethkalmer |
updated, using 1.8.7 participants are registered |
2010-02-08 08:13:41 utc |
kennethkalmer |
john, participants registering by you ? |
2010-02-08 08:14:00 utc |
kennethkalmer |
i know the order in my tests are wrong, just ensuring the registration works 100% |
2010-02-08 08:14:02 utc |
jmettraux |
sorry, hands full here, I was just helping remotely |
2010-02-08 08:14:29 utc |
jmettraux |
I have no operational ruote-kit for the moment |
2010-02-08 08:15:17 utc |
kennethkalmer |
no worries, was lazy testing |
2010-02-08 08:17:36 utc |
anb_ |
sorry, i was afk |
2010-02-08 08:18:38 utc |
anb_ |
so it is working fine on 1.8 |
2010-02-08 08:18:57 utc |
anb_ |
must be a problem with my setup then |
2010-02-08 08:19:41 utc |
jmettraux |
sounds like it, but weird |
2010-02-08 08:23:12 utc |
anb_ |
i'll uninstall all gems and start fresh |
2010-02-08 08:23:25 utc |
jmettraux |
ok |
2010-02-08 08:29:10 utc |
kennethkalmer |
anb_: sorry this is such a mission, it is so hard to give real insightful help without access to the workstation |
2010-02-08 08:30:24 utc |
anb_ |
don't worry, I know how tricky it is |
2010-02-08 08:41:05 utc |
anb_ |
but thanks you 2 for trying :) |
2010-02-08 08:41:14 utc |
jmettraux |
you're welcome |
2010-02-08 08:41:23 utc |
jmettraux |
we're still here for the next steps |
2010-02-08 08:43:37 utc |
kennethkalmer |
+1 |
2010-02-08 08:43:42 utc |
anb_ |
now that I am cleaning my gem mess, would I be better off using rvm ? |
2010-02-08 08:44:34 utc |
kennethkalmer |
possibly, but it isn't a given |
2010-02-08 08:44:45 utc |
kennethkalmer |
rather get the first problem sorted out than make more |
2010-02-08 08:46:06 utc |
anb_ |
you're right. I already have a lot of things that are new to me in this setup |
2010-02-08 09:04:09 utc |
jmettraux |
kennethkalmer: an important thing that is currently missing from ruote-kit is /errors |
2010-02-08 09:04:15 utc |
jmettraux |
especially the GET part |
2010-02-08 09:05:25 utc |
kennethkalmer |
and /participants |
2010-02-08 09:05:27 utc |
kennethkalmer |
and /coffee |
2010-02-08 09:05:42 utc |
jmettraux |
+1 |
2010-02-08 09:05:49 utc |
kennethkalmer |
ACTION runs to the kitchen |
2010-02-08 09:05:58 utc |
jmettraux |
/errors is crucial |
2010-02-08 09:06:01 utc |
jmettraux |
IMHO |
2010-02-08 09:07:54 utc |
kennethkalmer |
agreed |
2010-02-08 09:08:04 utc |
kennethkalmer |
i need /participants & /errors in place to get rk into iiab |
2010-02-08 09:11:12 utc |
anb_ |
thanks for the lobbying John ;) |
2010-02-08 09:11:23 utc |
jmettraux |
:) you're welcome |
2010-02-08 09:11:46 utc |
anb_ |
are you guys working on OSX ? |
2010-02-08 09:12:19 utc |
jmettraux |
yes |
2010-02-08 09:12:23 utc |
jmettraux |
you ? |
2010-02-08 09:15:00 utc |
anb_ |
ubuntu.. but I also have a macbook |
2010-02-08 09:15:19 utc |
anb_ |
I could do the ruby/ruote stuff on it |
2010-02-08 09:15:39 utc |
jmettraux |
ubuntu should just work fine |
2010-02-08 09:18:58 utc |
anb_ |
It should |
2010-02-08 09:18:59 utc |
jmettraux |
kennethkalmer: ruote-kit is quite unintrusive, right ? it vendors a lot of things |
2010-02-08 09:19:10 utc |
jmettraux |
there shouldn't be any gem hell with it |
2010-02-08 09:19:42 utc |
anb_ |
it's using bundler |
2010-02-08 09:19:58 utc |
anb_ |
but I tried to install the gems manually too |
2010-02-08 09:20:18 utc |
anb_ |
I mean, using gem instead of bundle in vendor |
2010-02-08 09:20:57 utc |
jmettraux |
ok |
2010-02-08 09:21:16 utc |
anb_ |
I have json (1.2.0) and json_pure (1.2.0) |
2010-02-08 09:21:23 utc |
anb_ |
is that ok ? |
2010-02-08 09:21:27 utc |
jmettraux |
it is |
2010-02-08 09:21:34 utc |
jmettraux |
yajl-ruby is better |
2010-02-08 09:21:39 utc |
jmettraux |
(faster) |
2010-02-08 09:21:52 utc |
kennethkalmer |
ruote-kit can stay out the system if you need it to (thanks to bundler) |
2010-02-08 09:29:28 utc |
anb_ |
John, it's Rufus::Json.dup that actually writes to the file system ? |
2010-02-08 09:31:17 utc |
jmettraux |
anb_: no, it's more like File.open("x.json", "wb") { |f| f.puts(Rufus::Json.encode(o) } |
2010-02-08 09:31:54 utc |
anb_ |
because I tracked the call to register participant and it writes something in configurations/XX/participant_list.json |
2010-02-08 09:32:05 utc |
anb_ |
in there I have a list with the catchall and myparticipant |
2010-02-08 09:33:07 utc |
jmettraux |
that's perfect |
2010-02-08 09:33:36 utc |
anb_ |
but there should be a participant folder right ? |
2010-02-08 09:33:49 utc |
jmettraux |
sorry |
2010-02-08 09:33:54 utc |
jmettraux |
I was wrong before :( |
2010-02-08 09:34:08 utc |
jmettraux |
configurations/XX/participant_list.json is the right place |
2010-02-08 09:34:10 utc |
jmettraux |
sorry |
2010-02-08 09:34:19 utc |
anb_ |
oh :) ok no worries |
2010-02-08 09:34:30 utc |
anb_ |
I learned how to use the debugger :) |
2010-02-08 09:34:57 utc |
jmettraux |
never used a debugger in my life |
2010-02-08 09:35:09 utc |
jmettraux |
p / puts |
2010-02-08 09:35:12 utc |
jmettraux |
;) |
2010-02-08 09:35:34 utc |
anb_ |
lol |
2010-02-08 09:35:58 utc |
anb_ |
and I liked the trick you used to track the calls to register |
2010-02-08 09:36:06 utc |
anb_ |
to redefine the class |
2010-02-08 09:36:11 utc |
jmettraux |
:) |
2010-02-08 09:36:22 utc |
jmettraux |
I love Ruby for those tricks |
2010-02-08 09:36:42 utc |
anb_ |
it's a lot of flexibility |
2010-02-08 09:40:23 utc |
jmettraux |
try that |
2010-02-08 09:41:07 utc |
jmettraux |
s = "anb_"; def s.length; 0; end; p "anb_".length; p s.length |
2010-02-08 09:42:52 utc |
anb_ |
nice but you can really mess everything up :) |
2010-02-08 09:43:02 utc |
jmettraux |
:) |
2010-02-08 09:43:47 utc |
kennethkalmer |
with great power comes great responsibility :) |
2010-02-08 09:44:04 utc |
anb_ |
hehe |
2010-02-08 09:44:23 utc |
anb_ |
hey kenneth, are those Sinatra::RespondTo::UnhandledFormat: Sinatra::RespondTo::UnhandledFormat errors in rk normal ? or is it just me ? |
2010-02-08 09:44:44 utc |
kennethkalmer |
it is the sinatra plugin I use |
2010-02-08 09:44:48 utc |
kennethkalmer |
drives me nuts |
2010-02-08 09:45:17 utc |
anb_ |
so it's not just me |
2010-02-08 09:45:27 utc |
kennethkalmer |
nope |
2010-02-08 09:53:47 utc |
anb_ |
John, if you have time, can you look at this http://gist.github.com/298021 ? |
2010-02-08 09:54:16 utc |
anb_ |
it's still my participant issue |
2010-02-08 09:54:36 utc |
anb_ |
myparticipant seems to be correctly registered, but when used in the workflow, I get an error |
2010-02-08 09:55:25 utc |
jmettraux |
the participant list can't see it |
2010-02-08 09:55:27 utc |
jmettraux |
weird |
2010-02-08 09:57:26 utc |
jmettraux |
ok |
2010-02-08 09:57:31 utc |
jmettraux |
let's try some things out |
2010-02-08 09:57:36 utc |
anb_ |
the config looks correct ? |
2010-02-08 09:57:46 utc |
jmettraux |
it looks like it |
2010-02-08 09:58:38 utc |
jmettraux |
p RuoteKit.engine.context.plist.send(:get_list) |
2010-02-08 09:58:50 utc |
jmettraux |
right after the participant registration should be interesting |
2010-02-08 09:59:24 utc |
anb_ |
{"list"=>[["^myparticipant$", "inpa_\"myparticipant\""], ["^.*$", ["Ruote::StorageParticipant", {}]]], "_rev"=>3, "put_at"=>"2010-02-08 10:01:13.779296 UTC", "_id"=>"participant_list", "type"=>"configurations"} |
2010-02-08 09:59:37 utc |
jmettraux |
ok |
2010-02-08 09:59:41 utc |
jmettraux |
next test |
2010-02-08 10:00:04 utc |
jmettraux |
p Ruote.engine.context.plist.lookup_info('myparticipant') |
2010-02-08 10:00:09 utc |
jmettraux |
same location |
2010-02-08 10:01:29 utc |
anb_ |
http://gist.github.com/298026 |
2010-02-08 10:01:34 utc |
anb_ |
output is hughe |
2010-02-08 10:02:08 utc |
anb_ |
oups maybe it's because I have a "raise" in the participant block ? |
2010-02-08 10:02:17 utc |
jmettraux |
no |
2010-02-08 10:02:21 utc |
jmettraux |
not at all |
2010-02-08 10:02:44 utc |
jmettraux |
the block should/will be executed only when it's called / it receives a workitem |
2010-02-08 10:02:51 utc |
anb_ |
ok |
2010-02-08 10:03:39 utc |
jmettraux |
http://github.com/jmettraux/ruote/blob/ruote2.1/lib/ruote/exp/fe_participant.rb#L136-140 why does participant_info end up being nil ??? |
2010-02-08 10:06:11 utc |
jmettraux |
is your ruote under vendor ? |
2010-02-08 10:06:20 utc |
anb_ |
it's not nil right after the registration at least |
2010-02-08 10:06:39 utc |
jmettraux |
exactly |
2010-02-08 10:06:58 utc |
anb_ |
no, it was previously but now I have 2.1.5 gem |
2010-02-08 10:07:07 utc |
jmettraux |
ok |
2010-02-08 10:08:52 utc |
anb_ |
I'll try to run ruote-kit without a worker |
2010-02-08 10:08:58 utc |
jmettraux |
wait |
2010-02-08 10:09:01 utc |
anb_ |
and start a worker in another thread by hand ? |
2010-02-08 10:09:10 utc |
anb_ |
ok |
2010-02-08 10:09:40 utc |
jmettraux |
adding that in config.ru, right after the participant reg : http://gist.github.com/298031 |
2010-02-08 10:10:00 utc |
jmettraux |
it will fail, but give us more info |
2010-02-08 10:12:29 utc |
anb_ |
I kept the call to lookup_info and modifed context to @context http://gist.github.com/298032 |
2010-02-08 10:13:21 utc |
anb_ |
(updated gist) |
2010-02-08 10:13:54 utc |
anb_ |
sorry, afk |
2010-02-08 10:15:51 utc |
jmettraux |
more info http://gist.github.com/298035 |
2010-02-08 10:22:57 utc |
jmettraux |
I'll be back later |
2010-02-08 10:45:14 utc |
anb_ |
seems fine : http://gist.github.com/298050 |
2010-02-08 11:59:16 utc |
anb_ |
i'm back |
2010-02-08 12:04:04 utc |
jmettraux |
me as well |
2010-02-08 12:05:29 utc |
anb_ |
good :) did you see http://gist.github.com/298050 ? |
2010-02-08 12:05:36 utc |
jmettraux |
no |
2010-02-08 12:06:04 utc |
anb_ |
it's the output from your last ParticipantList |
2010-02-08 12:06:12 utc |
jmettraux |
aah |
2010-02-08 12:06:16 utc |
jmettraux |
weird |
2010-02-08 12:06:32 utc |
anb_ |
seems correct, no ? |
2010-02-08 12:06:41 utc |
jmettraux |
seems perfect |
2010-02-08 12:06:51 utc |
jmettraux |
still nil though |
2010-02-08 12:07:09 utc |
anb_ |
I tried to have a worker in another ruby process and configured ruote-kit without a worker |
2010-02-08 12:07:14 utc |
anb_ |
same error |
2010-02-08 12:08:51 utc |
anb_ |
it's ok to have a process without a cursor or sequence ? with just one participant ? |
2010-02-08 12:09:02 utc |
jmettraux |
it's perfectly fine |
2010-02-08 12:11:47 utc |
jmettraux |
I want to solve this issue |
2010-02-08 12:11:53 utc |
jmettraux |
what is your version of ruote in there ? |
2010-02-08 12:13:22 utc |
anb_ |
gem list : http://gist.github.com/298050 |
2010-02-08 12:15:33 utc |
jmettraux |
http://gist.github.com/298089 another try if you don't mind |
2010-02-08 12:16:10 utc |
jmettraux |
I think I know what's going on |
2010-02-08 12:16:32 utc |
jmettraux |
BlockParticipant only work when the worker is within an engine |
2010-02-08 12:17:19 utc |
anb_ |
I don't mind :) size is one |
2010-02-08 12:17:35 utc |
jmettraux |
argh |
2010-02-08 12:18:07 utc |
anb_ |
bad news ? |
2010-02-08 12:18:13 utc |
jmettraux |
no no |
2010-02-08 12:18:18 utc |
jmettraux |
let me prepare a new gist |
2010-02-08 12:20:19 utc |
anb_ |
sure |
2010-02-08 12:21:24 utc |
jmettraux |
http://gist.github.com/298094 please |
2010-02-08 12:23:07 utc |
jmettraux |
the MyParticipant stuff in there is useless, it was something I was preparing for a next test |
2010-02-08 12:23:20 utc |
jmettraux |
but the lookup_info should be interesting |
2010-02-08 12:23:47 utc |
anb_ |
ok let me try |
2010-02-08 12:24:51 utc |
anb_ |
http://gist.github.com/298097 |
2010-02-08 12:25:26 utc |
anb_ |
not nil |
2010-02-08 12:25:28 utc |
jmettraux |
seems ok |
2010-02-08 12:26:09 utc |
jmettraux |
you became a champ of gist forking |
2010-02-08 12:26:19 utc |
anb_ |
:) |
2010-02-08 12:26:21 utc |
jmettraux |
it should work by now |
2010-02-08 12:26:53 utc |
anb_ |
but I'm confused |
2010-02-08 12:27:03 utc |
anb_ |
is there a problem with the lookup_info ? |
2010-02-08 12:27:04 utc |
jmettraux |
? |
2010-02-08 12:27:15 utc |
jmettraux |
I don't think so |
2010-02-08 12:27:42 utc |
anb_ |
but you redefined it |
2010-02-08 12:28:34 utc |
jmettraux |
here is the original : http://github.com/jmettraux/ruote/blob/v2.1.5/lib/ruote/part/participant_list.rb#L149-158 |
2010-02-08 12:28:55 utc |
jmettraux |
the latest gist is merely a verbose version of it |
2010-02-08 12:29:27 utc |
anb_ |
doh |
2010-02-08 12:30:01 utc |
jmettraux |
it should work now, with the original (ie without the redefinition) |
2010-02-08 12:30:49 utc |
anb_ |
really ? but it wasn't working 10min ago |
2010-02-08 12:30:53 utc |
anb_ |
let me try |
2010-02-08 12:31:39 utc |
jmettraux |
the previous redefinitions we were using were all returning nil |
2010-02-08 12:31:52 utc |
jmettraux |
we were just looking into, but breaking it |
2010-02-08 12:32:07 utc |
jmettraux |
the latest gist is the original + some debug output |
2010-02-08 12:32:33 utc |
jmettraux |
2 hours ago, that was more problematic |
2010-02-08 12:33:03 utc |
jmettraux |
maybe the effects of the gem cleaning you did IIRC |
2010-02-08 12:34:37 utc |
anb_ |
i'm still getting the # |
2010-02-08 12:35:00 utc |
jmettraux |
argh |
2010-02-08 12:35:18 utc |
jmettraux |
even with the "decoration" ? |
2010-02-08 12:35:32 utc |
anb_ |
but you're right about the lookup, i forgot that we broke it |
2010-02-08 12:36:10 utc |
anb_ |
decoration ? you mean the ParticipantList of the last gist ? |
2010-02-08 12:36:16 utc |
jmettraux |
yes |
2010-02-08 12:36:28 utc |
jmettraux |
... |
2010-02-08 12:36:30 utc |
jmettraux |
somehow |
2010-02-08 12:36:52 utc |
jmettraux |
could you please tar.gz your test dir and send it to me ? |
2010-02-08 12:37:04 utc |
jmettraux |
I want to have a closer look |
2010-02-08 12:37:53 utc |
anb_ |
yes doesn't work either. I'm sorry i'm using up a lot of your time with this |
2010-02-08 12:38:00 utc |
jmettraux |
no worries |
2010-02-08 12:38:19 utc |
jmettraux |
I want it to work for you |
2010-02-08 12:42:57 utc |
anb_ |
your IRC client supports file transfer ? |
2010-02-08 12:43:22 utc |
jmettraux |
not really |
2010-02-08 12:43:48 utc |
jmettraux |
jmettraux at gmail dot com |
2010-02-08 12:43:53 utc |
jmettraux |
please |
2010-02-08 12:44:08 utc |
kennethkalmer |
can you CC me please ? |
2010-02-08 12:44:16 utc |
kennethkalmer |
kenneth.kalmer at gmail dot com |
2010-02-08 12:46:04 utc |
anb_ |
sure thing |
2010-02-08 12:46:05 utc |
anb_ |
sent |
2010-02-08 12:46:23 utc |
jmettraux |
ACTION processing |
2010-02-08 12:47:30 utc |
anb_ |
* praying |
2010-02-08 12:50:45 utc |
jmettraux |
1.8.7p72 ? |
2010-02-08 12:50:47 utc |
kennethkalmer |
ACTION strugling with slow gmail :( |
2010-02-08 12:53:25 utc |
anb_ |
ruby version ? ruby 1.8.7 (2009-06-12 patchlevel 174) [i486-linux] |
2010-02-08 12:55:00 utc |
jmettraux |
================================================================================ |
2010-02-08 12:55:01 utc |
jmettraux |
[:ip_keys, []] |
2010-02-08 12:55:01 utc |
jmettraux |
[:pa, "inpa_\"myparticipant\""] |
2010-02-08 12:55:03 utc |
jmettraux |
[:ip, nil] |
2010-02-08 12:55:05 utc |
jmettraux |
[:returning, NilClass] |
2010-02-08 12:55:07 utc |
jmettraux |
================================================================================ |
2010-02-08 12:55:16 utc |
jmettraux |
that makes sense |
2010-02-08 12:56:50 utc |
anb_ |
your BlockParticipant is nil ? |
2010-02-08 12:57:24 utc |
jmettraux |
ruote-kit's worker has no access to the engine |
2010-02-08 12:57:37 utc |
jmettraux |
it doesn't see block participants |
2010-02-08 12:59:17 utc |
jmettraux |
I cannot serialize block participants, they have to stick with the engine itself |
2010-02-08 12:59:34 utc |
jmettraux |
so if the worker is not "within" the engine, no block participnat |
2010-02-08 12:59:37 utc |
jmettraux |
cipant |
2010-02-08 12:59:45 utc |
jmettraux |
but there is a bug here |
2010-02-08 12:59:57 utc |
jmettraux |
the worker should not even look at the workitem |
2010-02-08 13:00:20 utc |
anb_ |
each worker has a list of participant it has access to ? |
2010-02-08 13:00:34 utc |
jmettraux |
they all share the same list |
2010-02-08 13:00:43 utc |
jmettraux |
but ruby blocks cannot be serialized, |
2010-02-08 13:01:01 utc |
anb_ |
I see |
2010-02-08 13:01:07 utc |
jmettraux |
I cannot "insert" them into the storage so that any worker can use it |
2010-02-08 13:01:09 utc |
jmettraux |
them |
2010-02-08 13:02:02 utc |
anb_ |
and how does the worker know that it should not loot the workitem ? |
2010-02-08 13:02:10 utc |
anb_ |
*look |
2010-02-08 13:04:25 utc |
jmettraux |
that's where the bug is |
2010-02-08 13:05:09 utc |
jmettraux |
if the lookup reveals an "inpa_\"xxxx\"" participant, the worker knows it can only deal with it if it has access to the engine |
2010-02-08 13:05:23 utc |
jmettraux |
but it seems that this check is ineffective |
2010-02-08 13:06:11 utc |
anb_ |
all right |
2010-02-08 13:06:29 utc |
jmettraux |
this works : http://gist.github.com/298118 |
2010-02-08 13:06:45 utc |
jmettraux |
your ruote-amqp participant was not working exactly for the same reason |
2010-02-08 13:07:06 utc |
jmettraux |
RuoteKit.engine.register_participant('amqp', RuoteAMQP::Participant.new(:reply_ |
2010-02-08 13:07:06 utc |
jmettraux |
by_default => true) ) |
2010-02-08 13:07:20 utc |
jmettraux |
that instantiates immediately the participant |
2010-02-08 13:07:36 utc |
jmettraux |
that means that only the worker inside the engine can handle it |
2010-02-08 13:07:43 utc |
jmettraux |
the right thing to do is : |
2010-02-08 13:08:13 utc |
jmettraux |
Ruote.engine.register_participant('amqp', RuoteAMQP::Participant, :reply_by_default => true) |
2010-02-08 13:08:28 utc |
jmettraux |
where the instantiation is left to the workers |
2010-02-08 13:08:38 utc |
jmettraux |
there is a catch though |
2010-02-08 13:08:50 utc |
jmettraux |
it seems that there is a AMQP... configuration required |
2010-02-08 13:08:59 utc |
jmettraux |
this configuration should be done for each worker |
2010-02-08 13:12:14 utc |
anb_ |
ok now I understand |
2010-02-08 13:12:27 utc |
jmettraux |
yes, the alpha participant is OK |
2010-02-08 13:12:35 utc |
jmettraux |
Ruote.define { alpha } |
2010-02-08 13:12:40 utc |
jmettraux |
will print a workitem to the console |
2010-02-08 13:14:09 utc |
kennethkalmer |
thanks jmettraux ! |
2010-02-08 13:14:16 utc |
kennethkalmer |
i'll update the ruote-amqp documentation |
2010-02-08 13:14:18 utc |
jmettraux |
you're welcome |
2010-02-08 13:14:18 utc |
anb_ |
yes tha't invaluable help |
2010-02-08 13:14:22 utc |
anb_ |
*that's |
2010-02-08 13:14:25 utc |
jmettraux |
sorry guys |
2010-02-08 13:14:33 utc |
kennethkalmer |
by no means |
2010-02-08 13:14:50 utc |
kennethkalmer |
ACTION offers a golden nespresso cap |
2010-02-08 13:14:51 utc |
jmettraux |
ruote 2.1 is powerful but introduces some challenges |
2010-02-08 13:15:07 utc |
jmettraux |
ACTION OK for the golden cap |
2010-02-08 13:15:15 utc |
anb_ |
so to register_participant you can give either a class or an instance of class ? |
2010-02-08 13:15:19 utc |
jmettraux |
yes |
2010-02-08 13:15:29 utc |
jmettraux |
but instances are for engine workers only |
2010-02-08 13:15:49 utc |
anb_ |
it's safer to work on class, but it will get instanced a lot I guess |
2010-02-08 13:16:00 utc |
jmettraux |
for each "dispatch" |
2010-02-08 13:16:41 utc |
anb_ |
so maybe that's a question for you kenneth: where do I get the chance to configure the AMQP settings for the ruote-kit worker ? |
2010-02-08 13:17:15 utc |
jmettraux |
kennethkalmer: question for you |
2010-02-08 13:17:30 utc |
kennethkalmer |
growls on 'kenneth' too :) |
2010-02-08 13:17:45 utc |
kennethkalmer |
anb_: let me see |
2010-02-08 13:17:53 utc |
jmettraux |
sorry did not know |
2010-02-08 13:18:02 utc |
kennethkalmer |
no worries :) |
2010-02-08 13:18:18 utc |
kennethkalmer |
anb_: config.ru would be used by rackup |
2010-02-08 13:18:28 utc |
kennethkalmer |
you can make an amqp_config.rb file |
2010-02-08 13:18:35 utc |
kennethkalmer |
require it from config.ru |
2010-02-08 13:18:46 utc |
kennethkalmer |
and require it from the script you spawn your worker from |
2010-02-08 13:18:52 utc |
kennethkalmer |
actually, lets step one back |
2010-02-08 13:19:03 utc |
kennethkalmer |
how are you planning on running the workers ? |
2010-02-08 13:19:41 utc |
anb_ |
not really |
2010-02-08 13:20:02 utc |
anb_ |
I'll see how it goes but if a ruote-kit worker is enough I'll keep it that way |
2010-02-08 13:20:27 utc |
kennethkalmer |
for just sending messages out over amqp a single worker should be sufficient |
2010-02-08 13:20:42 utc |
anb_ |
I think so |
2010-02-08 13:21:11 utc |
kennethkalmer |
then your current config.ru should work just fine |
2010-02-08 13:21:14 utc |
anb_ |
config.run_worker = true will spawn one worker right ? |
2010-02-08 13:21:29 utc |
kennethkalmer |
yip |
2010-02-08 13:21:43 utc |
anb_ |
perfect |
2010-02-08 13:21:57 utc |
anb_ |
thanks |
2010-02-08 13:23:59 utc |
anb_ |
IT IS WORKING |
2010-02-08 13:24:01 utc |
anb_ |
:) |
2010-02-08 13:27:50 utc |
kennethkalmer |
yeah |
2010-02-08 13:31:12 utc |
jmettraux |
great ! |
2010-02-08 13:53:39 utc |
jmettraux |
I'm tempted to nuke BlockParticipant in ruote 2.1 |
2010-02-08 13:53:47 utc |
jmettraux |
they are misleading |
2010-02-08 13:53:57 utc |
jmettraux |
I wish I could do block.to_ruby |
2010-02-08 13:54:06 utc |
jmettraux |
ok |
2010-02-08 13:54:11 utc |
jmettraux |
have a good day guys ! |
2010-02-08 13:54:30 utc |
wayneeseguin |
You also1 |
2010-02-08 13:54:38 utc |
anb_ |
have a nice evening |
2010-02-08 13:54:39 utc |
jmettraux |
ciao Wayne ! |
2010-02-08 13:54:40 utc |
anb_ |
thanks again |
2010-02-08 13:54:47 utc |
jmettraux |
you're welcome ! |