Changeset 1620


Ignore:
Timestamp:
24/10/06 12:28:50 (13 years ago)
Author:
selatham
Message:

fix bug where 'in' directory not being cleared initially.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI01-discovery/trunk/ingestAutomation/OAIBatch/oai_ingest.py

    r1619 r1620  
    2424# 17/10/06 SEL cope with different discovery formats - not just DIF. 
    2525# 23/10/06 SEL keywords not mandatory in config file. 
     26# 24/10/06 SEL fix bug where 'in' directory not being cleared initially. display more information when running. 
    2627 
    2728import os 
     
    7071if harvest_home == "": 
    7172    sys.exit("Failed at getting harvested records directory stage. datacentre config file tried = %s" %datacentre_config_filename) 
     73else: 
     74    print "INFO: harvested records are in %s" %harvest_home 
     75 
    7276if datacentre_groups == "": 
    73      print "INFO: No groups/keywords set for datacentre %s" %datacentre 
     77    print "INFO: No groups/keywords set for datacentre %s" %datacentre 
     78else: 
     79    print "INFO: datacentre groups/keywords = %s" %datacentre_groups 
     80 
    7481if datacentre_format == "": 
    7582    sys.exit("Failed at stage: getting datacentre format. datacentre config file tried = %s" %datacentre_config_filename) 
     83else: 
     84    print "INFO: format being harvested = %s" %datacentre_format 
    7685 
    7786#any records to harvest? 
     
    106115# Create/clear the directory for the 'out' processed copy of the discovery records. 
    107116if os.path.isdir("/usr/local/WSClients/OAIBatch/data/" + datacentre +"/discovery"): 
    108     commandline = "ls -1 /usr/local/WSClients/OAIBatch/data/" + datacentre +"/discovery/ | xargs -i rm -f {\}" 
     117    commandline = "ls -1 /usr/local/WSClients/OAIBatch/data/" + datacentre +"/discovery/ | xargs -i rm /usr/local/WSClients/OAIBatch/data/" + datacentre +"/discovery/{\}" 
    109118    print "Executing : " + commandline 
    110119    status = os.system(commandline) 
Note: See TracChangeset for help on using the changeset viewer.