Rev | Line | |
---|
[302] | 1 | from datetime import datetime
|
---|
| 2 | class NoResourcesNowException( Exception):
|
---|
| 3 | '''
|
---|
| 4 | Indicates that we are out of resources to handle the request. But this can be
|
---|
| 5 | remedied by trying again later.
|
---|
| 6 | '''
|
---|
| 7 | def __init__(self, message:str, suggestedLater:datetime):
|
---|
| 8 | '''
|
---|
| 9 | @param message the detail message
|
---|
| 10 | @param suggestedLater the suggested time to retry
|
---|
| 11 | '''
|
---|
| 12 | super().__init__(message)
|
---|
| 13 | self._later = suggestedLater;
|
---|
| 14 |
|
---|
| 15 | def getLater(self)->datetime:
|
---|
| 16 | return self._later
|
---|
| 17 |
|
---|
| 18 | |
---|
Note:
See
TracBrowser
for help on using the repository browser.