Skip to content

Commit

Permalink
BibHarvest: add custom name to BibUpload tasks
Browse files Browse the repository at this point in the history
* Use the custom name 'oai' for BibUpload tasks spawned from
  post-harvest processeses, in order to work-around an issue
  with other BibUpload tasks submitted during harvest getting
  equal priority.
  • Loading branch information
jalavik authored and tiborsimko committed Aug 5, 2011
1 parent bc48678 commit deeff05
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/bibharvest/lib/oai_harvest_daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,7 @@ def task_run_core():
if proceed == 0 or proceed == -1 : #update needed!
write_message("source %s is going to be updated" % (reponame,))
fromdate = str(repos[0][7])
fromdate = fromdate.split()[0] # get rid of time
# of the day for the moment
fromdate = fromdate.split()[0] # get rid of time of the day for the moment
task_update_progress("Harvesting %s (%i/%i)" % \
(reponame,
j, \
Expand Down Expand Up @@ -850,8 +849,9 @@ def call_bibupload(marcxmlfile, mode=None, oai_src_id= -1):
if os.path.exists(marcxmlfile):
try:
args = mode
# Add priority 6 and file to upload to arguments #FIXME: allow per-harvest priority
args.extend(["-P","6",marcxmlfile])
# Add custom name 'oai' with priority 6 and file to upload to arguments
#FIXME: allow per-harvest arguments
args.extend(["-N", "oai","-P","6",marcxmlfile])
task_id = task_low_level_submission("bibupload", "oaiharvest", *tuple(args))
create_oaiharvest_log(task_id, oai_src_id, marcxmlfile)
except Exception, msg:
Expand Down

0 comments on commit deeff05

Please sign in to comment.