Skip to content

Commit

Permalink
try pull by id model
Browse files Browse the repository at this point in the history
richard-jones committed Oct 19, 2023
1 parent 8713a1d commit 80e9108
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions portality/bll/services/journal.py
Original file line number Diff line number Diff line change
@@ -254,14 +254,18 @@ def _get_article_kvs(journal):
return kvs

# ~~!JournalCSV:Feature->Journal:Model~~
journals = []
logger("Loading journal ids")
journal_ids = []
for j in models.Journal.all_in_doaj(page_size=1000): #Fixme: limited by ES, this may not be sufficient
journals.append(j)
journal_ids.append(j.id)
logger("Journal ids loaded: {x}".format(x=len(journal_ids)))

cols = {}
for j in journals:
for jid in journal_ids:
export_start = datetime.utcnow()
logger("Exporting journal {x}".format(x=j.id))
logger("Exporting journal {x}".format(x=jid))

j = models.Journal.pull(jid)

time_log = []
bj = j.bibjson()

0 comments on commit 80e9108

Please sign in to comment.