librelist archives

« back to archive

Resque 1.6.1

Resque 1.6.1

From:
Chris Wanstrath
Date:
2010-03-25 @ 22:22
Grab it: gem install resque

Mostly tweaks, but lots of resque-web love courtesy of Michael Dwan.
Thanks to everyone who contributed to this release.

CHANGES

* Bugfix: Workers may not be clearing their state correctly on
  shutdown
* Added example monit config.
* Exception class is now recorded when an error is raised in a
  worker.
* web: Unit tests
* web: Show namespace in header and footer
* web: Remove a queue
* web: Retry failed jobs

Compare view: http://github.com/defunkt/resque/compare/v1.6.0...v1.6.1

Chris

Re: [resque] Resque 1.6.1

From:
Adam Tucker
Date:
2010-03-26 @ 01:42
Hi Chris,

Thanks for the update! I ran into a bit of an issue, just wanted to let
people know as I'm sure it'll happen to others.  I updated the Resque gem
from 1.6.0 to 1.6.1 and relaunched the resque-web interface. The page was
completely blank, eek! Turns out I had the redis-0.1.2 gem installed, and
updating that gem to 0.2.0 installed redis-namespace-0.3.0 automagically.
Once that was done the interface worked fine again.

-Adam

On Thu, Mar 25, 2010 at 6:22 PM, Chris Wanstrath <chris@ozmm.org> wrote:

> Grab it: gem install resque
>
> Mostly tweaks, but lots of resque-web love courtesy of Michael Dwan.
> Thanks to everyone who contributed to this release.
>
> CHANGES
>
> * Bugfix: Workers may not be clearing their state correctly on
>  shutdown
> * Added example monit config.
> * Exception class is now recorded when an error is raised in a
>  worker.
> * web: Unit tests
> * web: Show namespace in header and footer
> * web: Remove a queue
> * web: Retry failed jobs
>
> Compare view: http://github.com/defunkt/resque/compare/v1.6.0...v1.6.1
>
> Chris
>

Re: [resque] Resque 1.6.1

From:
Chris Wanstrath
Date:
2010-03-26 @ 04:51
On Thu, Mar 25, 2010 at 6:42 PM, Adam Tucker <adam.j.tucker@gmail.com> wrote:

> Thanks for the update! I ran into a bit of an issue, just wanted to let
> people know as I'm sure it'll happen to others.  I updated the Resque gem
> from 1.6.0 to 1.6.1 and relaunched the resque-web interface. The page was
> completely blank, eek! Turns out I had the redis-0.1.2 gem installed, and
> updating that gem to 0.2.0 installed redis-namespace-0.3.0 automagically.
> Once that was done the interface worked fine again.

Does this mean the gem dependencies are wrong on the Resque gem?

Re: [resque] Resque 1.6.1

From:
Adam Tucker
Date:
2010-03-26 @ 14:15
Could be. I didn't do any digging, but I was running redis 0.1.2 and
redis-namespace 0.1.0 when it failed.

On Fri, Mar 26, 2010 at 12:51 AM, Chris Wanstrath <chris@ozmm.org> wrote:

> On Thu, Mar 25, 2010 at 6:42 PM, Adam Tucker <adam.j.tucker@gmail.com>
> wrote:
>
> > Thanks for the update! I ran into a bit of an issue, just wanted to let
> > people know as I'm sure it'll happen to others.  I updated the Resque gem
> > from 1.6.0 to 1.6.1 and relaunched the resque-web interface. The page was
> > completely blank, eek! Turns out I had the redis-0.1.2 gem installed, and
> > updating that gem to 0.2.0 installed redis-namespace-0.3.0 automagically.
> > Once that was done the interface worked fine again.
>
> Does this mean the gem dependencies are wrong on the Resque gem?
>

Re: [resque] Resque 1.6.1

From:
Mason Jones
Date:
2010-03-26 @ 16:59
Works beautifully and I've already used the retry of a failed job this
morning, thanks! I was wondering if anyone's looked into adding a way
to kill/restart workers via the web interface? It would just be a
convenience, since during development I find myself stopping/starting
workers quite a lot in order to make sure updated code is running. If
there were a way in the web UI to "reload" workers, that would be
pretty cool. I haven't looked into it to see whether it's a
straightforward thing to do or not; anyone else happen to have given
it any thought?


On Thu, Mar 25, 2010 at 3:22 PM, Chris Wanstrath <chris@ozmm.org> wrote:
> Grab it: gem install resque
>
> Mostly tweaks, but lots of resque-web love courtesy of Michael Dwan.
> Thanks to everyone who contributed to this release.
>
> CHANGES
>
> * Bugfix: Workers may not be clearing their state correctly on
>  shutdown
> * Added example monit config.
> * Exception class is now recorded when an error is raised in a
>  worker.
> * web: Unit tests
> * web: Show namespace in header and footer
> * web: Remove a queue
> * web: Retry failed jobs
>
> Compare view: http://github.com/defunkt/resque/compare/v1.6.0...v1.6.1
>
> Chris
>

Re: [resque] Resque 1.6.1

From:
Adam Tucker
Date:
2010-03-26 @ 17:19
I know it's not in the same web page, but I've been happily using Monit's
web UI for this. I can kill workers individually, and if I want to kill them
all at once I can just pop into the terminal and do 'monit -g resque stop
all'

On Fri, Mar 26, 2010 at 12:59 PM, Mason Jones <masonoise@gmail.com> wrote:

> Works beautifully and I've already used the retry of a failed job this
> morning, thanks! I was wondering if anyone's looked into adding a way
> to kill/restart workers via the web interface? It would just be a
> convenience, since during development I find myself stopping/starting
> workers quite a lot in order to make sure updated code is running. If
> there were a way in the web UI to "reload" workers, that would be
> pretty cool. I haven't looked into it to see whether it's a
> straightforward thing to do or not; anyone else happen to have given
> it any thought?
>
>
> On Thu, Mar 25, 2010 at 3:22 PM, Chris Wanstrath <chris@ozmm.org> wrote:
> > Grab it: gem install resque
> >
> > Mostly tweaks, but lots of resque-web love courtesy of Michael Dwan.
> > Thanks to everyone who contributed to this release.
> >
> > CHANGES
> >
> > * Bugfix: Workers may not be clearing their state correctly on
> >  shutdown
> > * Added example monit config.
> > * Exception class is now recorded when an error is raised in a
> >  worker.
> > * web: Unit tests
> > * web: Show namespace in header and footer
> > * web: Remove a queue
> > * web: Retry failed jobs
> >
> > Compare view: http://github.com/defunkt/resque/compare/v1.6.0...v1.6.1
> >
> > Chris
> >
>

Re: [resque] Resque 1.6.1

From:
Mason Jones
Date:
2010-03-26 @ 17:23
True enough, that could work. I guess the only downside is that I'm
not using Monit on my laptop, where I'm doing my development work. But
I suppose I could do so for the convenience factor...

On Fri, Mar 26, 2010 at 10:19 AM, Adam Tucker <adam.j.tucker@gmail.com> wrote:
> I know it's not in the same web page, but I've been happily using Monit's
> web UI for this. I can kill workers individually, and if I want to kill them
> all at once I can just pop into the terminal and do 'monit -g resque stop
> all'
>
> On Fri, Mar 26, 2010 at 12:59 PM, Mason Jones <masonoise@gmail.com> wrote:
>>
>> Works beautifully and I've already used the retry of a failed job this
>> morning, thanks! I was wondering if anyone's looked into adding a way
>> to kill/restart workers via the web interface? It would just be a
>> convenience, since during development I find myself stopping/starting
>> workers quite a lot in order to make sure updated code is running. If
>> there were a way in the web UI to "reload" workers, that would be
>> pretty cool. I haven't looked into it to see whether it's a
>> straightforward thing to do or not; anyone else happen to have given
>> it any thought?
>>
>>
>> On Thu, Mar 25, 2010 at 3:22 PM, Chris Wanstrath <chris@ozmm.org> wrote:
>> > Grab it: gem install resque
>> >
>> > Mostly tweaks, but lots of resque-web love courtesy of Michael Dwan.
>> > Thanks to everyone who contributed to this release.
>> >
>> > CHANGES
>> >
>> > * Bugfix: Workers may not be clearing their state correctly on
>> >  shutdown
>> > * Added example monit config.
>> > * Exception class is now recorded when an error is raised in a
>> >  worker.
>> > * web: Unit tests
>> > * web: Show namespace in header and footer
>> > * web: Remove a queue
>> > * web: Retry failed jobs
>> >
>> > Compare view: http://github.com/defunkt/resque/compare/v1.6.0...v1.6.1
>> >
>> > Chris
>> >
>
>

Re: [resque] Resque 1.6.1

From:
Chris Wanstrath
Date:
2010-03-26 @ 17:27
On Fri, Mar 26, 2010 at 10:23 AM, Mason Jones <masonoise@gmail.com> wrote:

> True enough, that could work. I guess the only downside is that I'm
> not using Monit on my laptop, where I'm doing my development work. But
> I suppose I could do so for the convenience factor...

So, little known fact: I got a little bit drunk one night and started
writing a command line tool to manage workers ;)

$ resque
( help screen )
$ resque list
airistotle.local:33938:* (idle)
$ resque kill airistotle.local:33938:*
** killed airistotle.local:33938:*
** removed airistotle.local:33938:*

It's not complete and could use a lot more features, plus
documentation, but if you think it'd be helpful in development mode I
would be motivated to make it better and advertise it.

-- 
Chris Wanstrath
http://github.com/defunkt

Re: [resque] Resque 1.6.1

From:
Mason Jones
Date:
2010-03-26 @ 17:38
On Fri, Mar 26, 2010 at 10:27 AM, Chris Wanstrath <chris@ozmm.org> wrote:
> On Fri, Mar 26, 2010 at 10:23 AM, Mason Jones <masonoise@gmail.com> wrote:
>
>> True enough, that could work. I guess the only downside is that I'm
>> not using Monit on my laptop, where I'm doing my development work. But
>> I suppose I could do so for the convenience factor...
>
> So, little known fact: I got a little bit drunk one night and started
> writing a command line tool to manage workers ;)

That does seem useful (especially the drunk part). I do tend to keep a
resque-web tab open all the time, but I can definitely see some handy
uses for command-line access to information like workers, queue sizes,
failed jobs, etc. Hey, it could be a way to easily script retries,
perhaps.

Which makes me wonder if resque-web has JSON access to certain
information? Specifically I guess a way to do a web service-type call
to get a list of failed jobs, which could then be parsed, with calls
to trigger retries as needed. One thing I noticed, though, is that
when a job is retried, it stays on the failed queue. Sort of makes
sense, but at the same time it's then in an in-between state, sort of
failed but maybe not really.

Some random thoughts there, I know, but there it is...


> $ resque
> ( help screen )
> $ resque list
> airistotle.local:33938:* (idle)
> $ resque kill airistotle.local:33938:*
> ** killed airistotle.local:33938:*
> ** removed airistotle.local:33938:*
>
> It's not complete and could use a lot more features, plus
> documentation, but if you think it'd be helpful in development mode I
> would be motivated to make it better and advertise it.
>
> --
> Chris Wanstrath
> http://github.com/defunkt
>

Re: [resque] Resque 1.6.1

From:
Scott Tamosunas
Date:
2010-03-26 @ 18:21
Agreed. I could see some command line tools very handy. I often find myself
doing things like the following from the console for failure mining (which
in itself requires drinking):

length = Resque.redis.llen("failed")
my_failed_particular_jobs = Resque.redis.lrange("failed", 0, length).reject
{|item|JSON.parse(item)["payload"]["class"] != "ParticularJob"}
...

Scott

On Fri, Mar 26, 2010 at 10:38 AM, Mason Jones <masonoise@gmail.com> wrote:

> On Fri, Mar 26, 2010 at 10:27 AM, Chris Wanstrath <chris@ozmm.org> wrote:
> > On Fri, Mar 26, 2010 at 10:23 AM, Mason Jones <masonoise@gmail.com>
> wrote:
> >
> >> True enough, that could work. I guess the only downside is that I'm
> >> not using Monit on my laptop, where I'm doing my development work. But
> >> I suppose I could do so for the convenience factor...
> >
> > So, little known fact: I got a little bit drunk one night and started
> > writing a command line tool to manage workers ;)
>
> That does seem useful (especially the drunk part). I do tend to keep a
> resque-web tab open all the time, but I can definitely see some handy
> uses for command-line access to information like workers, queue sizes,
> failed jobs, etc. Hey, it could be a way to easily script retries,
> perhaps.
>
> Which makes me wonder if resque-web has JSON access to certain
> information? Specifically I guess a way to do a web service-type call
> to get a list of failed jobs, which could then be parsed, with calls
> to trigger retries as needed. One thing I noticed, though, is that
> when a job is retried, it stays on the failed queue. Sort of makes
> sense, but at the same time it's then in an in-between state, sort of
> failed but maybe not really.
>
> Some random thoughts there, I know, but there it is...
>
>
> > $ resque
> > ( help screen )
> > $ resque list
> > airistotle.local:33938:* (idle)
> > $ resque kill airistotle.local:33938:*
> > ** killed airistotle.local:33938:*
> > ** removed airistotle.local:33938:*
> >
> > It's not complete and could use a lot more features, plus
> > documentation, but if you think it'd be helpful in development mode I
> > would be motivated to make it better and advertise it.
> >
> > --
> > Chris Wanstrath
> > http://github.com/defunkt
> >
>

Re: [resque] Resque 1.6.1

From:
Chris Wanstrath
Date:
2010-03-26 @ 18:27
On Fri, Mar 26, 2010 at 11:21 AM, Scott Tamosunas <tamosunas@gmail.com> wrote:

> Agreed. I could see some command line tools very handy. I often find myself
> doing things like the following from the console for failure mining (which
> in itself requires drinking):
> length = Resque.redis.llen("failed")
> my_failed_particular_jobs = Resque.redis.lrange("failed", 0, length).reject
> {|item|JSON.parse(item)["payload"]["class"] != "ParticularJob"}

Okay, great.

http://github.com/defunkt/resque-cli

Anyone have a favorite command line builder framework? Thor? Something else?

-- 
Chris Wanstrath
http://github.com/defunkt

Re: [resque] Resque 1.6.1

From:
Chris Wanstrath
Date:
2010-03-26 @ 17:22
On Fri, Mar 26, 2010 at 10:19 AM, Adam Tucker <adam.j.tucker@gmail.com> wrote:

> I know it's not in the same web page, but I've been happily using Monit's
> web UI for this. I can kill workers individually, and if I want to kill them
> all at once I can just pop into the terminal and do 'monit -g resque stop
> all'

I think this is a great way to do it. I believe god also has a web ui.
Not sure about bluepill.

-- 
Chris Wanstrath
http://github.com/defunkt