Skip to content

Commit e104a5f

Browse files
committed
Fix indentation in Process::Runnable
Somehow I hadn't noticed that until now ^_^U
1 parent 1043984 commit e104a5f

File tree

1 file changed

+41
-41
lines changed

1 file changed

+41
-41
lines changed

lib/solid_queue/processes/runnable.rb

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -18,60 +18,60 @@ def stop
1818
@thread&.join
1919
end
2020

21-
private
22-
DEFAULT_MODE = :async
21+
private
22+
DEFAULT_MODE = :async
2323

24-
def mode
25-
(@mode || DEFAULT_MODE).to_s.inquiry
26-
end
24+
def mode
25+
(@mode || DEFAULT_MODE).to_s.inquiry
26+
end
2727

28-
def boot
29-
register_signal_handlers if supervised?
30-
SolidQueue.logger.info("[SolidQueue] Starting #{self}")
31-
end
28+
def boot
29+
register_signal_handlers if supervised?
30+
SolidQueue.logger.info("[SolidQueue] Starting #{self}")
31+
end
3232

33-
def start_loop
34-
if mode.async?
35-
@thread = Thread.new { do_start_loop }
36-
else
37-
do_start_loop
33+
def start_loop
34+
if mode.async?
35+
@thread = Thread.new { do_start_loop }
36+
else
37+
do_start_loop
38+
end
3839
end
39-
end
4040

41-
def do_start_loop
42-
loop do
43-
break if shutting_down?
41+
def do_start_loop
42+
loop do
43+
break if shutting_down?
4444

45-
wrap_in_app_executor do
46-
run
45+
wrap_in_app_executor do
46+
run
47+
end
4748
end
49+
ensure
50+
run_callbacks(:shutdown) { shutdown }
4851
end
49-
ensure
50-
run_callbacks(:shutdown) { shutdown }
51-
end
5252

53-
def shutting_down?
54-
stopping? || supervisor_went_away? || finished?
55-
end
53+
def shutting_down?
54+
stopping? || supervisor_went_away? || finished?
55+
end
5656

57-
def run
58-
raise NotImplementedError
59-
end
57+
def run
58+
raise NotImplementedError
59+
end
6060

61-
def stopping?
62-
@stopping
63-
end
61+
def stopping?
62+
@stopping
63+
end
6464

65-
def finished?
66-
running_inline? && all_work_completed?
67-
end
65+
def finished?
66+
running_inline? && all_work_completed?
67+
end
6868

69-
def all_work_completed?
70-
false
71-
end
69+
def all_work_completed?
70+
false
71+
end
7272

73-
def running_inline?
74-
mode.inline?
75-
end
73+
def running_inline?
74+
mode.inline?
75+
end
7676
end
7777
end

0 commit comments

Comments
 (0)