add logging, extend id length

This commit is contained in:
Jason 2020-11-21 21:21:31 +00:00
parent 0bfa920654
commit b12a3570b0
2 changed files with 2 additions and 1 deletions

View File

@ -155,6 +155,7 @@ def _add_new_refs():
database.put_ref(ref, nid, source, urlref) database.put_ref(ref, nid, source, urlref)
logging.info('Added ref ' + ref) logging.info('Added ref ' + ref)
except database.IntegrityError: except database.IntegrityError:
logging.info('Unable to add ref ' + ref)
continue continue
def _update_current_story(item): def _update_current_story(item):

View File

@ -9,7 +9,7 @@ import string
from bleach.sanitizer import Cleaner from bleach.sanitizer import Cleaner
def gen_rand_id(): def gen_rand_id():
return ''.join(random.choice(string.ascii_uppercase) for _ in range(4)) return ''.join(random.choice(string.ascii_uppercase) for _ in range(5))
def render_md(md): def render_md(md):
if md: if md: