iterator for processing window; make location provider consume less memory

This commit is contained in:
Dima Gerasimov 2018-11-12 21:29:47 +00:00
parent 1ca1bcd309
commit cb39e5a00e
2 changed files with 78 additions and 21 deletions

View file

@ -1,4 +1,4 @@
from location import get_logger, get_locations, iter_locations
from location import get_logger, get_locations, iter_locations, get_groups
logger = get_logger()
@ -17,7 +17,7 @@ if len(sys.argv) > 1:
else:
raise RuntimeError(f"Unknown command {cmd}")
else:
for p in iter_locations():
for p in get_groups(cached=True):
pass
# TODO need datetime!
print(p)
# print(p)