Skip to content

Commit 8dcd6e9

Browse files
committed
Merge remote-tracking branch 'origin/master' into node_norm_update
2 parents e7cb60b + e637d26 commit 8dcd6e9

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

cohd/biolink_mapper.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import difflib
55
from collections import defaultdict
66
import urllib3
7+
from datetime import datetime
78

89
from .cohd_utilities import DomainClass
910
from .app import app, cache
@@ -870,6 +871,15 @@ def build_mappings() -> Tuple[str, int]:
870871
cur.execute(sql)
871872
conn.commit()
872873

874+
# Insert into update_log
875+
sql = """
876+
INSERT INTO biolink.update_log (timestamp, count)
877+
VALUES (%s, %s)
878+
"""
879+
params = [datetime.now(), mapping_count + string_match_count]
880+
cur.execute(sql, params)
881+
conn.commit()
882+
873883
status_message = f"""Current number of mapped mappings: {current_count}
874884
Current number of string mappings: {current_count_string}
875885
New mapped mappings: {mapping_count}

0 commit comments

Comments
 (0)