Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions rrrspec-server/lib/rrrspec/server/worker_runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,14 @@ def cleaning_process(logger, taskset, cancel_watcher_pid, pid_to_slave_number)

def work
@worker.update_current_taskset(nil)
taskset = @worker.dequeue_taskset
worker_log = WorkerLog.create(@worker, taskset)
logger = TimedLogger.new(worker_log)

while true do
taskset = @worker.dequeue_taskset
worker_log = WorkerLog.create(@worker, taskset)
logger = TimedLogger.new(worker_log)

break if taskset.status == 'running'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check has done in l.196.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't use check.call because it would return from the work method.
The fix relies on not notifying the master if the worker has tasksets in the queue. After returning from work method a notification to master is sent.

end

check = proc do
unless taskset.status == 'running'
Expand Down