Skip to content

Commit 34170c9

Browse files
authored
Merge pull request #99 from mkmba-nz/no-workers-in-console
Don't start libjobqueue worker unless running under the Server
2 parents cb0d2fa + ccf1360 commit 34170c9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/litestack/litejobqueue.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ def schedule(spawn = false, &block)
179179

180180
# create a worker according to environment
181181
def create_worker
182+
return if defined?(Rails) && !defined?(Rails::Server)
182183
Litescheduler.spawn do
183184
worker_sleep_index = 0
184185
while @running

0 commit comments

Comments
 (0)