librelist archives

« back to archive

Reload of worker classes on change?

Reload of worker classes on change?

From:
Jak Charlton
Date:
2013-09-13 @ 00:30
Is there any way to get Sidekiq to reload workers automatically?  I've
tried a few suggestions from the web with no luck, I seem to always have to
shutdown and restart Sidekiq to get the changes processing


Jak

Re: [sidekiq] Reload of worker classes on change?

From:
Mike Perham
Date:
2013-09-13 @ 00:38
Also, I always recommend to people that they do less manual testing and
more automated testing.  Then the lack of code reloading isn't as painful.


On Thu, Sep 12, 2013 at 5:30 PM, Jak Charlton <jakcharlton@gmail.com> wrote:

> Is there any way to get Sidekiq to reload workers automatically?  I've
> tried a few suggestions from the web with no luck, I seem to always have to
> shutdown and restart Sidekiq to get the changes processing
>
>
> Jak
>

Re: [sidekiq] Reload of worker classes on change?

From:
Ken Mayer
Date:
2013-09-13 @ 04:40
We use the rerun gem(https://github.com/alexch/rerun) in our Procfile:

worker: bundle exec rerun --background --dir app,db,lib --pattern
'{**/*.rb}' -- bundle exec sidekiq --verbose


Works great!

On Thu, Sep 12, 2013 at 5:38 PM, Mike Perham <mperham@gmail.com> wrote:

> Also, I always recommend to people that they do less manual testing and
> more automated testing.  Then the lack of code reloading isn't as painful.
>
>
> On Thu, Sep 12, 2013 at 5:30 PM, Jak Charlton <jakcharlton@gmail.com>wrote:
>
>> Is there any way to get Sidekiq to reload workers automatically?  I've
>> tried a few suggestions from the web with no luck, I seem to always have to
>> shutdown and restart Sidekiq to get the changes processing
>>
>>
>> Jak
>>
>
>


-- 
*Ken Mayer* | Engineering Manager | Pivotal Labs
ken@pivotallabs.com | 808.722.6142 (c) | *875 Howard St, San Francisco, CA
94103 <http://goo.gl/maps/7eGVl>*

Re: [sidekiq] Reload of worker classes on change?

From:
Mike Perham
Date:
2013-09-13 @ 05:06
Ken, that would be an awesome tip to add to the wiki somewhere, maybe on
the FAQ page.


On Thu, Sep 12, 2013 at 9:40 PM, Ken Mayer <ken@pivotallabs.com> wrote:

> We use the rerun gem(https://github.com/alexch/rerun) in our Procfile:
>
> worker: bundle exec rerun --background --dir app,db,lib --pattern
> '{**/*.rb}' -- bundle exec sidekiq --verbose
>
>
> Works great!
>
>
> On Thu, Sep 12, 2013 at 5:38 PM, Mike Perham <mperham@gmail.com> wrote:
>
>> Also, I always recommend to people that they do less manual testing and
>> more automated testing.  Then the lack of code reloading isn't as painful.
>>
>>
>> On Thu, Sep 12, 2013 at 5:30 PM, Jak Charlton <jakcharlton@gmail.com>wrote:
>>
>>> Is there any way to get Sidekiq to reload workers automatically?  I've
>>> tried a few suggestions from the web with no luck, I seem to always have to
>>> shutdown and restart Sidekiq to get the changes processing
>>>
>>>
>>> Jak
>>>
>>
>>
>
>
> --
> *Ken Mayer* | Engineering Manager | Pivotal Labs
> ken@pivotallabs.com | 808.722.6142 (c) | *875 Howard St, San Francisco,
> CA 94103 <http://goo.gl/maps/7eGVl>*
>

Re: [sidekiq] Reload of worker classes on change?

From:
Jak Charlton
Date:
2013-09-13 @ 05:07
Just tried Ken's tip and it works like a dream!

Had tried to mess with Guard to do it but wasn't a good option - Rerun is a
sweet trick!


Thanks


On Fri, Sep 13, 2013 at 3:06 PM, Mike Perham <mperham@gmail.com> wrote:

> Ken, that would be an awesome tip to add to the wiki somewhere, maybe on
> the FAQ page.
>
>
> On Thu, Sep 12, 2013 at 9:40 PM, Ken Mayer <ken@pivotallabs.com> wrote:
>
>> We use the rerun gem(https://github.com/alexch/rerun) in our Procfile:
>>
>> worker: bundle exec rerun --background --dir app,db,lib --pattern
>> '{**/*.rb}' -- bundle exec sidekiq --verbose
>>
>>
>> Works great!
>>
>>
>> On Thu, Sep 12, 2013 at 5:38 PM, Mike Perham <mperham@gmail.com> wrote:
>>
>>> Also, I always recommend to people that they do less manual testing and
>>> more automated testing.  Then the lack of code reloading isn't as painful.
>>>
>>>
>>> On Thu, Sep 12, 2013 at 5:30 PM, Jak Charlton <jakcharlton@gmail.com>wrote:
>>>
>>>> Is there any way to get Sidekiq to reload workers automatically?  I've
>>>> tried a few suggestions from the web with no luck, I seem to always have to
>>>> shutdown and restart Sidekiq to get the changes processing
>>>>
>>>>
>>>> Jak
>>>>
>>>
>>>
>>
>>
>> --
>> *Ken Mayer* | Engineering Manager | Pivotal Labs
>> ken@pivotallabs.com | 808.722.6142 (c) | *875 Howard St, San Francisco,
>> CA 94103 <http://goo.gl/maps/7eGVl>*
>>
>
>

Re: [sidekiq] Reload of worker classes on change?

From:
Ken Mayer
Date:
2013-09-13 @ 05:17
Done.


https://github.com/mperham/sidekiq/wiki/FAQ#how-can-i-get-sidekiq-workers-to-reload-automatically-when-i-change-the-source-code


On Thu, Sep 12, 2013 at 10:06 PM, Mike Perham <mperham@gmail.com> wrote:

> Ken, that would be an awesome tip to add to the wiki somewhere, maybe on
> the FAQ page.
>
>
> On Thu, Sep 12, 2013 at 9:40 PM, Ken Mayer <ken@pivotallabs.com> wrote:
>
>> We use the rerun gem(https://github.com/alexch/rerun) in our Procfile:
>>
>> worker: bundle exec rerun --background --dir app,db,lib --pattern
>> '{**/*.rb}' -- bundle exec sidekiq --verbose
>>
>>
>> Works great!
>>
>>
>> On Thu, Sep 12, 2013 at 5:38 PM, Mike Perham <mperham@gmail.com> wrote:
>>
>>> Also, I always recommend to people that they do less manual testing and
>>> more automated testing.  Then the lack of code reloading isn't as painful.
>>>
>>>
>>> On Thu, Sep 12, 2013 at 5:30 PM, Jak Charlton <jakcharlton@gmail.com>wrote:
>>>
>>>> Is there any way to get Sidekiq to reload workers automatically?  I've
>>>> tried a few suggestions from the web with no luck, I seem to always have to
>>>> shutdown and restart Sidekiq to get the changes processing
>>>>
>>>>
>>>> Jak
>>>>
>>>
>>>
>>
>>
>> --
>> *Ken Mayer* | Engineering Manager | Pivotal Labs
>> ken@pivotallabs.com | 808.722.6142 (c) | *875 Howard St, San Francisco,
>> CA 94103 <http://goo.gl/maps/7eGVl>*
>>
>
>


-- 
*Ken Mayer* | Engineering Manager | Pivotal Labs
ken@pivotallabs.com | 808.722.6142 (c) | *875 Howard St, San Francisco, CA
94103 <http://goo.gl/maps/7eGVl>*

Re: [sidekiq] Reload of worker classes on change?

From:
Mike Perham
Date:
2013-09-13 @ 00:35
Not that I'm aware of.  Code reloading isn't threadsafe in Ruby.


On Thu, Sep 12, 2013 at 5:30 PM, Jak Charlton <jakcharlton@gmail.com> wrote:

> Is there any way to get Sidekiq to reload workers automatically?  I've
> tried a few suggestions from the web with no luck, I seem to always have to
> shutdown and restart Sidekiq to get the changes processing
>
>
> Jak
>