projects
/
kiosk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Testosterone and sensitivity.
[kiosk.git]
/
renderer.py
diff --git
a/renderer.py
b/renderer.py
index 0d8988423d2ea33276a1203b4a706c2036ebf143..55f540c026f481d577dade1b7936750865fae42b 100644
(file)
--- a/
renderer.py
+++ b/
renderer.py
@@
-5,10
+5,10
@@
import logging
import time
from typing import Dict, Optional, Set
import time
from typing import Dict, Optional, Set
-from decorator_utils import invocation_logged
+from
pyutils.
decorator_utils import invocation_logged
-logger = logging.getLogger(__
fil
e__)
+logger = logging.getLogger(__
nam
e__)
class renderer(ABC):
class renderer(ABC):
@@
-48,32
+48,28
@@
class abstaining_renderer(renderer):
while True:
key = self.should_render(keys_to_skip)
if key is None:
while True:
key = self.should_render(keys_to_skip)
if key is None:
- logger.info(
- f'renderer: Found nothing to do in "{self.get_name()}"; returning.'
- )
+ logger.info(f'Found nothing to do in "{self.get_name()}"; returning.')
break
if key in tries_per_key:
tries_per_key[key] += 1
else:
tries_per_key[key] = 0
break
if key in tries_per_key:
tries_per_key[key] += 1
else:
tries_per_key[key] = 0
- op = f
'{self.get_name()}.{key}'
+ op = f
"{self.get_name()}.{key}"
if tries_per_key[key] >= 3:
if tries_per_key[key] >= 3:
- logger.warning(
- f'renderer: Too many failures in "{op}"; giving up.'
- )
+ logger.warning(f'Too many failures in "{op}"; giving up.')
keys_to_skip.add(key)
else:
keys_to_skip.add(key)
else:
- msg = f'
renderer: e
xecuting "{op}"'
+ msg = f'
E
xecuting "{op}"'
if tries_per_key[key] > 1:
if tries_per_key[key] > 1:
- msg = msg + f
' (retry #{tries_per_key[key]})'
+ msg = msg + f
" (retry #{tries_per_key[key]})"
logger.info(msg)
if self.periodic_render(key):
logger.info(msg)
if self.periodic_render(key):
- logger.debug(f'
renderer: {op}
succeeded.')
+ logger.debug(f'
"{op}"
succeeded.')
self.last_runs[key] = time.time()
else:
self.last_runs[key] = time.time()
else:
- logger.warning(f'
renderer: {op}
failed; returned False.')
+ logger.warning(f'
"{op}"
failed; returned False.')
@invocation_logged
@abstractmethod
@invocation_logged
@abstractmethod