1
0
Fork 0

Use mutable NOTIFY_EVERY_LINE.

This commit is contained in:
voussoir 2021-10-15 23:03:50 -07:00
parent dc0ea1959c
commit 455f95d904
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB

View file

@ -7,6 +7,7 @@ import time
from voussoirkit import backoff from voussoirkit import backoff
from voussoirkit import betterhelp from voussoirkit import betterhelp
from voussoirkit import mutables
from voussoirkit import operatornotify from voussoirkit import operatornotify
from voussoirkit import ratelimiter from voussoirkit import ratelimiter
from voussoirkit import sqlhelpers from voussoirkit import sqlhelpers
@ -361,6 +362,7 @@ def get_argparse(args):
@ctrlc_commit @ctrlc_commit
def livestream_argparse(args): def livestream_argparse(args):
NOTIFY_EVERY_LINE.set(True)
insert_items(livestream(), commit_period=args.commit_period) insert_items(livestream(), commit_period=args.commit_period)
return 0 return 0
@ -402,7 +404,9 @@ def update_items_argparse(args):
insert_items(items, commit_period=args.commit_period) insert_items(items, commit_period=args.commit_period)
return 0 return 0
@operatornotify.main_decorator(subject='hnarchive.py') NOTIFY_EVERY_LINE = mutables.Boolean(False)
@operatornotify.main_decorator(subject='hnarchive.py', notify_every_line=NOTIFY_EVERY_LINE)
@vlogging.main_decorator @vlogging.main_decorator
def main(argv): def main(argv):
parser = argparse.ArgumentParser(description=DOCSTRING) parser = argparse.ArgumentParser(description=DOCSTRING)