Skip to content
This repository was archived by the owner on Sep 20, 2021. It is now read-only.

Commit fe90083

Browse files
committed
bst_claimsync: fix circular import
Signed-off-by: Samuele Kaplun <[email protected]>
1 parent 2d34ba7 commit fe90083

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: bibtasklets/bst_claimsync.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
from invenio.config import CFG_REDIS_HOST_LABS, CFG_TMPSHAREDDIR
77
from invenio.bibformat_elements.bfe_INSPIRE_enhanced_marcxml import get_hepname_id, get_personid_canonical_id
8-
from invenio.bibsched_tasklets.bst_prodsync import run_on_slave_db
98
from invenio.bibtask import write_message
109
from invenio.dbquery import run_sql
1110

@@ -38,14 +37,15 @@ def bst_claimsync():
3837
Note2: in order to set the lastrun to a particular date edit
3938
the file CFG_TMPSHAREDDIR/claimsync_lastrun.txt.
4039
"""
40+
from invenio.bibsched_tasklets.bst_prodsync import run_ro_on_slave_db
4141
r = redis.StrictRedis.from_url(CFG_REDIS_HOST_LABS)
4242
if r.llen(REDIS_KEY) != 0:
4343
write_message("Skipping prodsync: Redis queue is not yet empty")
4444
return
4545
now = strftime('%Y-%m-%d %H:%M:%S')
4646
lastrun = get_lastrun()
4747
write_message("Syncing claims modified since %s" % lastrun)
48-
with run_on_slave_db():
48+
with run_ro_on_slave_db():
4949
claims = run_sql("""
5050
SELECT personid, bibrec, name, flag
5151
FROM aidPERSONIDPAPERS

0 commit comments

Comments
 (0)