A sleeper
The Big Sleep’s constructor
| Param: |
|
|---|
The Big Sleep’s constructor
| Param: |
|
|---|
Methods
| __init__([end, total, interval, verbose]) | The Big Sleep’s constructor |
| emit(*args, **kwargs) | |
| log_error(error[, message]) | Logs the error in bold red |
Attributes
| end | end datetime | ||
| logger |
|
||
| then | the stopping-time | ||
| timer | An EventTimer for the wait decorator | ||
| total | Timedelta representing relative time in the future to stop | ||
| zero | A zero timedelta |
Checks the paramaters
| Raise: | ApeError if mis-configured |
|---|
Closes the timer, sets self.then to 0.
Logs the error in bold red
| Param: |
|
|---|
end datetime
| Returns: | datetime to stop |
|---|
| Returns: | A logging object. |
|---|
A -1 timedelta
| Returns: | timedelta that subtracts one second when added to another |
|---|
the stopping-time
| Returns: | datetime set to future stop-time |
|---|---|
| Raise: | ApeError if neither end nor total is set |
An EventTimer for the wait decorator
| Returns: | EventTimer with interval set to self.interval |
|---|
Timedelta representing relative time in the future to stop
| Returns: | timedelta to stop in the future or None |
|---|
A zero timedelta
| Returns: | timedelta(0) |
|---|