Module: Cumulus::StatusCodes
- Defined in:
- lib/util/StatusCodes.rb
Overview
Public: Provide methods for setting the status code that
Cumulus should exit with
Constant Summary collapse
- OK =
Indicates that we are exiting normally
0
- EXCEPTION =
Indicates there was an exception during execution
1
- DIFFS =
Indicates that there were diffs
2
- SYNC_DIFFS =
Indicates that there were diffs and they were synced
3
- @@CURRENT_STATUS =
Holds the value for the current status
OK
Class Method Summary collapse
-
.set_status(status) ⇒ Object
Public: Sets the status code if it is more severe than the current status code.
Class Method Details
.set_status(status) ⇒ Object
Public: Sets the status code if it is more severe than the current status code
25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/util/StatusCodes.rb', line 25 def set_status(status) # Only set the status if we are not already in exception state if @@CURRENT_STATUS != EXCEPTION # Only set the status if it is more severe (higher) than the current status if status > @@CURRENT_STATUS @@CURRENT_STATUS = status end end end |