Skip to content

Commit

Permalink
Fix indentation in Process::Runnable
Browse files Browse the repository at this point in the history
Somehow I hadn't noticed that until now ^_^U
  • Loading branch information
rosa committed Mar 14, 2024
1 parent 1043984 commit e104a5f
Showing 1 changed file with 41 additions and 41 deletions.
82 changes: 41 additions & 41 deletions lib/solid_queue/processes/runnable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,60 +18,60 @@ def stop
@thread&.join
end

private
DEFAULT_MODE = :async
private
DEFAULT_MODE = :async

def mode
(@mode || DEFAULT_MODE).to_s.inquiry
end
def mode
(@mode || DEFAULT_MODE).to_s.inquiry
end

def boot
register_signal_handlers if supervised?
SolidQueue.logger.info("[SolidQueue] Starting #{self}")
end
def boot
register_signal_handlers if supervised?
SolidQueue.logger.info("[SolidQueue] Starting #{self}")
end

def start_loop
if mode.async?
@thread = Thread.new { do_start_loop }
else
do_start_loop
def start_loop
if mode.async?
@thread = Thread.new { do_start_loop }
else
do_start_loop
end
end
end

def do_start_loop
loop do
break if shutting_down?
def do_start_loop
loop do
break if shutting_down?

wrap_in_app_executor do
run
wrap_in_app_executor do
run
end
end
ensure
run_callbacks(:shutdown) { shutdown }
end
ensure
run_callbacks(:shutdown) { shutdown }
end

def shutting_down?
stopping? || supervisor_went_away? || finished?
end
def shutting_down?
stopping? || supervisor_went_away? || finished?
end

def run
raise NotImplementedError
end
def run
raise NotImplementedError
end

def stopping?
@stopping
end
def stopping?
@stopping
end

def finished?
running_inline? && all_work_completed?
end
def finished?
running_inline? && all_work_completed?
end

def all_work_completed?
false
end
def all_work_completed?
false
end

def running_inline?
mode.inline?
end
def running_inline?
mode.inline?
end
end
end

0 comments on commit e104a5f

Please sign in to comment.