... | ... |
@@ -47,8 +47,8 @@ module Rubysermon |
47 | 47 |
end |
48 | 48 |
|
49 | 49 |
def start_fetch_process_sleep_cycle |
50 |
- if not can_start_fetch_process_sleep_cycle? |
|
51 |
- abort() |
|
50 |
+ if (msg = cannot_start_fetch_process_sleep_cycle?) |
|
51 |
+ abort(msg) |
|
52 | 52 |
end |
53 | 53 |
|
54 | 54 |
while true |
... | ... |
@@ -61,8 +61,12 @@ module Rubysermon |
61 | 61 |
end |
62 | 62 |
end |
63 | 63 |
|
64 |
- def can_start_fetch_process_sleep_cycle? |
|
65 |
- @config[:repeat].to_i < 1 |
|
64 |
+ def cannot_start_fetch_process_sleep_cycle? |
|
65 |
+ if @config[:repeat].to_i < 1 |
|
66 |
+ return "Repeat cycle too short" |
|
67 |
+ end |
|
68 |
+ |
|
69 |
+ false |
|
66 | 70 |
end |
67 | 71 |
end |
68 | 72 |
end |