ruote tmp/log_2011-06-19.html

2011-06-19 02:59:23 utc amacgregor__ jmettraux, a bit rude but okay, I actually ended using reques
2011-06-19 02:59:44 utc amacgregor__ *resque
2011-06-19 03:00:03 utc jmettraux amacgregor_: are you saying I was rude to you ? Do you prefer seeing your request being ignored ?
2011-06-19 03:00:26 utc amacgregor__ not at all, don't meant to offend you
2011-06-19 03:00:48 utc amacgregor__ I emailed you the information that I had available,
2011-06-19 03:01:56 utc jmettraux please read the link I sent to you and you will understand that this was not enough information
2011-06-19 03:02:12 utc jmettraux please understand that I'm not payed to support you
2011-06-19 03:02:27 utc amacgregor__ lol dude take it easy
2011-06-19 03:02:30 utc jmettraux I have no incentive to clone your repo and run tests vaguely described
2011-06-19 03:02:40 utc amacgregor__ man
2011-06-19 03:02:48 utc amacgregor__ someone has a short fuse
2011-06-19 03:03:22 utc amacgregor__ I'm glad I didn't ended using rufus_scheduler
2011-06-19 03:03:32 utc jmettraux you're using resque-scheduler ?
2011-06-19 03:03:58 utc amacgregor__ yes I ended using it
2011-06-19 03:04:13 utc jmettraux https://rubygems.org/gems/resque-scheduler so you're using rufus-scheduler
2011-06-19 03:04:34 utc amacgregor__ to be honest rufus_scheduler looks way more simple but I couldn't make it
2011-06-19 03:04:37 utc amacgregor__ work
2011-06-19 03:04:57 utc jmettraux if you don't want to use software made by rude people you should avoid resque-scheduler, since it uses rufus-scheduler
2011-06-19 03:05:10 utc amacgregor__ lol
2011-06-19 03:05:33 utc amacgregor__ it actually works so I can tolerate rude people :D
2011-06-19 03:05:45 utc jmettraux laddie, you're the rude person
2011-06-19 03:06:20 utc amacgregor__ I'm not a lady or trying to be rude
2011-06-19 03:06:59 utc jmettraux you request was rude and you're a laddie and I'm not your dude
2011-06-19 03:08:04 utc amacgregor__ hmm ok, my apologies then
2011-06-19 03:10:26 utc jmettraux good read too : http://www.catb.org/~esr/faqs/smart-questions.html
2011-06-19 03:11:04 utc amacgregor__ hahahaha
2011-06-19 03:14:37 utc amacgregor__ in case you are still interested ruby 1.8.7, sinatra 1.2.6, rufus-scheduler 2.0.9 --- tested that rufus-scheduler was working on the IRB and it was ... but never got it working on my sinatra app, I followed the example from the readme, I made sure to require both rubygems and rufus-scheduler ... now after gettiing resque-scheduler working I wonder if for rufus do I need to set a rake task too ?
2011-06-19 03:16:24 utc jmettraux so when you turn on your computer and browse to the butler, it simply doesn't work ?
2011-06-19 03:16:44 utc jmettraux or is it when you turn the espresso machine on ?
2011-06-19 03:16:57 utc jmettraux how can I reproduce the issue
2011-06-19 03:17:30 utc jmettraux https://github.com/amacgregor/SocialButler the README is empty...
2011-06-19 03:17:44 utc amacgregor__ yeah just started to work on this today
2011-06-19 03:17:47 utc amacgregor__ ok, adding the notes works just fine
2011-06-19 03:18:21 utc jmettraux your email stated absolutely nothing about how to reproduce the issue
2011-06-19 03:18:34 utc amacgregor__ yup my mistake :)
2011-06-19 03:18:43 utc jmettraux "yo, this a schmofunk and it doesn't work"
2011-06-19 03:19:02 utc amacgregor__ hahaha
2011-06-19 03:19:33 utc jmettraux on other mailing list you would have gotten ignored as a clueless fart, I was kind enough to point you where a good "issue reporting howto"
2011-06-19 03:19:53 utc jmettraux I tried to help you and you called me rude
2011-06-19 03:20:18 utc amacgregor__ I'm sorry I will nominate for saint programmer of the year
2011-06-19 03:22:08 utc amacgregor__ ok on the get '/' around line 35 I have scheduler.in '1m' do puts "Test" end ... problem there is that never works ... I never see the output
2011-06-19 03:23:07 utc jmettraux https://github.com/amacgregor/SocialButler/blob/master/sbuttler.rb#L35 ?
2011-06-19 03:23:50 utc amacgregor__ yeah thats the latest version that is using resque-scheduler
2011-06-19 03:23:59 utc jmettraux cool
2011-06-19 03:24:36 utc amacgregor__ https://github.com/amacgregor/SocialButler/blob/88f4e85627e6d3051bf03d052bf0566599ab1f76/sbuttler.rb
2011-06-19 03:25:03 utc amacgregor__ thats the one with rufus
2011-06-19 03:25:16 utc jmettraux 1 minute later, it will emit "Test" to the STDOUT
2011-06-19 03:25:55 utc amacgregor__ yup but it doesn't
2011-06-19 03:26:02 utc jmettraux does it render the :home template ?
2011-06-19 03:26:16 utc amacgregor__ yeah all works
2011-06-19 03:26:19 utc jmettraux which server are you using ? Webrick, Thin ?
2011-06-19 03:26:48 utc amacgregor__ shotgun
2011-06-19 03:27:02 utc jmettraux never heard of that, do you have a link to that project ?
2011-06-19 03:27:13 utc amacgregor__ sure one sec
2011-06-19 03:28:02 utc amacgregor__ https://github.com/rtomayko/shotgun if I'm not mistaken thats the oen
2011-06-19 03:28:20 utc jmettraux laddie, it's a forking server
2011-06-19 03:29:18 utc jmettraux rufus-scheduler needs 1 thread where it lives
2011-06-19 03:29:24 utc amacgregor__ lol sorry webrick is the answer
2011-06-19 03:29:55 utc jmettraux IIRC a forked ruby process only has the main thread
2011-06-19 03:30:30 utc amacgregor__ hmm
2011-06-19 03:30:30 utc jmettraux Each time a request is received, it forks, loads the application in
2011-06-19 03:30:31 utc jmettraux the child process, processes the request, and exits the child process. The
2011-06-19 03:30:31 utc jmettraux result is clean, application-wide reloading of all source files and templates on
2011-06-19 03:31:30 utc jmettraux might be interesting to test with webrick or thin first
2011-06-19 03:31:54 utc jmettraux If I read shotgun's description correctly, there would be a scheduler created for each request
2011-06-19 03:32:05 utc jmettraux that gets killed once the request is processed
2011-06-19 03:32:14 utc jmettraux so no apparent result
2011-06-19 03:32:29 utc amacgregor_ Interesting
2011-06-19 03:33:17 utc jmettraux OK, so no worries since you got it working with resque-scheduler
2011-06-19 03:34:17 utc amacgregor_ so the reason it works with resque is because the worker and the queque are outside the app ?
2011-06-19 03:34:46 utc jmettraux yes
2011-06-19 03:35:03 utc jmettraux shotgun forks for each request
2011-06-19 03:37:06 utc amacgregor_ I'm going to try rufus without shotgun
2011-06-19 03:37:24 utc amacgregor_ and see if I get it working
2011-06-19 03:37:47 utc amacgregor_ I really liked the simplicity
2011-06-19 03:38:10 utc jmettraux the price of the simplicity is having the ruby runtime that hosts it always on
2011-06-19 03:38:23 utc jmettraux resque-scheduler adds persistence to rufus-scheduler
2011-06-19 03:38:50 utc jmettraux when your ruby runtime goes down, the rufus-scheduler and its schedules do vanish
2011-06-19 03:39:34 utc amacgregor_ very true
2011-06-19 03:39:38 utc jmettraux so now you know some constraints of the tools (shotgun, resque-scheduler, rufus-scheduler), you can take informed decisions
2011-06-19 03:40:00 utc amacgregor_ :)
2011-06-19 03:40:12 utc amacgregor_ thanks for helping this laddie
2011-06-19 03:42:12 utc jmettraux you have to say "lad", I'm older than you are
2011-06-19 03:42:29 utc jmettraux and I'm not Scott, so man is sufficient
2011-06-19 03:44:18 utc amacgregor_ lol I was referring to myself
2011-06-19 03:44:24 utc amacgregor_ but thank you man :)
2011-06-19 03:44:35 utc jmettraux you're welcome
2011-06-19 13:28:17 utc amacgregor_ Hi jmettraux
2011-06-19 13:28:29 utc jmettraux amacgregor_: hello
2011-06-19 13:31:21 utc amacgregor_ wondering if I can get your quick input, the scheduled jobs are running but I'm having a problem running a twitter client update in the job. I have tried several methods and no luck the puts get executed; https://gist.github.com/1034236
2011-06-19 13:31:31 utc amacgregor_ I don't see any errors captured by resque
2011-06-19 13:31:46 utc amacgregor_ I did notice that if I place a puts after the client.update call
2011-06-19 13:32:34 utc amacgregor_ its not executed suggesting the client.update is throwing an error
2011-06-19 13:33:40 utc jmettraux cooking up something for you, wait a bit
2011-06-19 13:33:50 utc amacgregor_ thanks
2011-06-19 13:35:28 utc jmettraux https://gist.github.com/1034280 this intercepts the exception and emits it to STDOUT, if the "Write note !" is visible, then this should display the error
2011-06-19 13:39:48 utc amacgregor_ interesting
2011-06-19 13:40:27 utc amacgregor_ I only see the Write note ! nothing else
2011-06-19 13:41:18 utc amacgregor_ I don't even see the 'puts '-' * 80' lines printed
2011-06-19 13:41:36 utc jmettraux what can you infer from this ?
2011-06-19 13:41:55 utc jmettraux what does that mean ?
2011-06-19 13:42:08 utc jmettraux please try to think out loud
2011-06-19 13:42:11 utc amacgregor_ lol
2011-06-19 13:42:13 utc amacgregor_ one sec
2011-06-19 13:46:54 utc amacgregor_ ok now we are talking #
2011-06-19 13:47:11 utc amacgregor_ I see my mistake I was not restarting the workers
2011-06-19 13:47:44 utc jmettraux well done
2011-06-19 13:52:22 utc amacgregor_ hmm now I see another error #https://api.twitter.com/1/statuses/update.json: 401: Could not authenticate with OAuth.>
2011-06-19 13:53:05 utc jmettraux I'm afraid I can't help you with that one, I haven't done anything with oauth in ages
2011-06-19 13:53:34 utc amacgregor_ yeah don't worry about that
2011-06-19 14:11:46 utc amacgregor_ weird not even setting the client inside the perform method works
2011-06-19 14:12:11 utc jmettraux does it even work outside ? From irb ?
2011-06-19 14:12:45 utc amacgregor_ yup
2011-06-19 14:13:06 utc jmettraux still the same error ? Unauthorized ?
2011-06-19 14:13:11 utc amacgregor_ it works if I call it from the /:id/publish route
2011-06-19 14:13:22 utc amacgregor_ yes unauthorized
2011-06-19 14:13:58 utc jmettraux what do you mean by "setting the client" ?
2011-06-19 14:14:13 utc amacgregor_ the object client = Twitter::Client.new
2011-06-19 14:14:53 utc jmettraux does the auth happen in the initializer of the twitter client ?
2011-06-19 14:15:16 utc jmettraux what auth params get passed at this point ?
2011-06-19 14:16:00 utc jmettraux probably the code running in the resque worker doesn't see the auth info and passes nils, and the twitter client runs into "unauthorized"
2011-06-19 14:16:11 utc jmettraux puts/p/pp/ap are your friends
2011-06-19 14:16:31 utc amacgregor_ ok will give it atry
2011-06-19 14:38:14 utc amacgregor_ interesting I did a puts $client.inspect and the var does have all the oauth keys
2011-06-19 14:41:43 utc jmettraux did you put it in the resque job ?
2011-06-19 14:42:18 utc jmettraux p $client
2011-06-19 14:42:23 utc jmettraux is shorter to type than
2011-06-19 14:42:28 utc jmettraux puts $client.inspect
2011-06-19 14:46:04 utc amacgregor_ yeah I did that on the resque job and in a normal request
2011-06-19 14:46:08 utc amacgregor_ both look the same
2011-06-19 14:46:57 utc jmettraux still unauthorized ?
2011-06-19 14:47:07 utc amacgregor_ yup only for the resque job
2011-06-19 14:47:53 utc jmettraux what about your initial idea of connecting from inside the resque job and re-doing the auth from there too ?
2011-06-19 14:48:10 utc jmettraux with your "$client" it seems you didn't pursue that idea
2011-06-19 14:48:39 utc jmettraux $client seem to imply you set the $client globally and hope it will be valid forever
2011-06-19 14:48:39 utc amacgregor_ lets try it out
2011-06-19 14:54:02 utc amacgregor_ yes well same error
2011-06-19 14:54:26 utc jmettraux show me your code
2011-06-19 14:56:43 utc amacgregor_ sure
2011-06-19 14:56:43 utc amacgregor_ https://gist.github.com/1034375
2011-06-19 14:59:08 utc jmettraux what does the puts client.inspect yield ?
2011-06-19 15:00:20 utc amacgregor_ #
2011-06-19 15:01:33 utc jmettraux could you please show me the backtrace of your unauthorized error ?
2011-06-19 15:01:50 utc amacgregor_ sure
2011-06-19 15:02:40 utc amacgregor_ https://gist.github.com/1034380
2011-06-19 15:04:42 utc jmettraux have your restarted your worker ?
2011-06-19 15:06:15 utc amacgregor_ yup
2011-06-19 15:07:24 utc jmettraux what does the "twitter configure block" look like ?
2011-06-19 15:08:23 utc amacgregor_ its just setting the config keys something like config.consumer_key = 'InfH4XXXXXXXXX7g'
2011-06-19 15:08:51 utc jmettraux where is the documentation for your twitter client ?
2011-06-19 15:09:16 utc amacgregor_ http://rdoc.info/gems/twitter
2011-06-19 15:09:21 utc amacgregor_ http://twitter.rubyforge.org/
2011-06-19 15:11:34 utc jmettraux are you using the faraday branch of it ?
2011-06-19 15:13:10 utc amacgregor_ good question
2011-06-19 15:13:14 utc amacgregor_ I have no idea
2011-06-19 15:13:32 utc jmettraux client has a #authenticated? method
2011-06-19 15:13:43 utc jmettraux it's private though
2011-06-19 15:13:50 utc jmettraux client.send(:authenticate?)
2011-06-19 15:14:00 utc jmettraux should tell you true or false
2011-06-19 15:14:04 utc amacgregor_ I isntalled the gem
2011-06-19 15:14:19 utc jmettraux which version ?
2011-06-19 15:14:26 utc amacgregor_ 1.5.0
2011-06-19 15:14:33 utc jmettraux ah great
2011-06-19 15:14:41 utc amacgregor_ ?
2011-06-19 15:15:08 utc jmettraux the release is tagged, I can read the code
2011-06-19 15:15:53 utc amacgregor_ ok cool
2011-06-19 15:16:42 utc jmettraux urgh, wrong authenticated? simply returns true if there are authentication settings
2011-06-19 15:17:20 utc amacgregor_ hmm
2011-06-19 15:19:36 utc jmettraux ok, running out of ideas
2011-06-19 15:22:39 utc jmettraux I'd have to look into faraday-middleware but it's getting late
2011-06-19 15:22:39 utc amacgregor_ how should I call the authenticated? method
2011-06-19 15:22:52 utc jmettraux this method is useless
2011-06-19 15:23:04 utc jmettraux well you can call it anyway
2011-06-19 15:23:10 utc jmettraux 00:13 jmettraux: client.send(:authenticate?)
2011-06-19 15:23:26 utc amacgregor_ ok thanks
2011-06-19 15:23:29 utc jmettraux puts client.send(:authenticate?)
2011-06-19 15:23:38 utc amacgregor_ I'm going to post the situation on the twitter gem group
2011-06-19 15:23:39 utc jmettraux puts client.send(:authenticated?)
2011-06-19 15:23:40 utc jmettraux sorry
2011-06-19 15:25:35 utc amacgregor_ question what about putting the twitter call on a method outside the module ? and calling the method
2011-06-19 15:26:06 utc jmettraux just try
2011-06-19 15:26:16 utc jmettraux (though I don't understand what you say)
2011-06-19 15:26:17 utc amacgregor_ ok
2011-06-19 15:27:29 utc amacgregor_ lol
2011-06-19 15:28:52 utc amacgregor_ arghh
2011-06-19 15:28:54 utc amacgregor_ same thing
2011-06-19 15:29:14 utc jmettraux this is not an interesting piece of information
2011-06-19 15:29:26 utc jmettraux well
2011-06-19 15:30:00 utc jmettraux going to bed, ciao !
2011-06-19 15:30:06 utc amacgregor_ cheers!
2011-06-19 23:15:40 utc jmettraux amacgregor amacgregor_: still around ?
2011-06-19 23:15:42 utc amacgregor_ yeah
2011-06-19 23:15:52 utc amacgregor_ and I'm guessing it was you right
2011-06-19 23:16:25 utc amacgregor_ 'I should change my password' ? btw I got it working
2011-06-19 23:29:42 utc amacgregor_ jmettraux, I found the problem
2011-06-19 23:30:30 utc jmettraux what was it ?]
2011-06-19 23:32:02 utc amacgregor_ the variable that I was passing to the update method
2011-06-19 23:32:23 utc jmettraux the text of the tweet
2011-06-19 23:32:29 utc amacgregor_ yup
2011-06-19 23:32:58 utc amacgregor_ I had on the resque call ':message => params[:content]
2011-06-19 23:33:28 utc amacgregor_ changing that to just 'params[:content]'
2011-06-19 23:33:31 utc amacgregor_ did the trick
2011-06-19 23:33:46 utc jmettraux so you passed a string instead of a hash
2011-06-19 23:33:54 utc amacgregor_ yup
2011-06-19 23:34:05 utc jmettraux and why did it work outside of resque ?
2011-06-19 23:34:47 utc amacgregor_ because outsite of resque I was passing a string
2011-06-19 23:40:46 utc amacgregor_ so all my problems so far have been bugs between my keyboard and the chair
2011-06-19 23:41:11 utc jmettraux lol
2011-06-19 23:41:31 utc jmettraux the last one, the spontaneous insertion of buggy code is fun
2011-06-19 23:41:39 utc amacgregor_ lol
2011-06-19 23:42:18 utc amacgregor_ don't mention that I feel stupid about that error you found :(
2011-06-19 23:42:20 utc jmettraux cripples any debugging methodology
2011-06-19 23:42:44 utc jmettraux no worries
2011-06-19 23:42:56 utc amacgregor_ lol :)
2011-06-19 23:45:04 utc jmettraux you should delete my "I should change my password" tweet
2011-06-19 23:48:14 utc amacgregor_ :)