oldmoe / litestack

MIT License
1.02k stars 56 forks source link

Don't start libjobqueue worker unless running under the Server #99

Closed mattbnz closed 4 months ago

mattbnz commented 6 months ago

In particular, this avoids starting queue workers in the console which leads to ActiveJob emitting log messages into the console, which is confusing and distracting.

mattbnz commented 6 months ago

I think this should be safe for generic/non-Rails usage of libjobqueue too, and I can't think of any Rails scenarios where this simplistic check will/would cause trouble off the top of my head, but happy to revise to a more complicated check if desired.

Thanks for Litestack and considering this patch!