add logging, extend id length
This commit is contained in:
parent
0bfa920654
commit
b12a3570b0
|
@ -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):
|
||||||
|
|
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user