Project

General

Profile

« Previous | Next » 

Revision 6689

look-up sych schedule from metacat properties instead of hardcoding them
https://redmine.dataone.org/issues/1933

View differences:

lib/metacat.properties
508 508
dataone.nodeReplicate=true
509 509
dataone.serviceName=d1
510 510

  
511
# the synchronization schedule
512
dataone.nodeSynchronization.schedule.year=*
513
dataone.nodeSynchronization.schedule.mon=*
514
dataone.nodeSynchronization.schedule.mday=*
515
dataone.nodeSynchronization.schedule.wday=?
516
dataone.nodeSynchronization.schedule.hour=*
517
dataone.nodeSynchronization.schedule.min=0/3
518
dataone.nodeSynchronization.schedule.sec=10
519

  
511 520
# state which versions of each MN tier service are availalble
512 521
dataone.mnCore.serviceAvailable=true
513 522
dataone.mnCore.serviceVersion=v1
src/edu/ucsb/nceas/metacat/dataone/MNodeService.java
793 793
            services.addService(sMNReplication);
794 794
            node.setServices(services);
795 795

  
796
            // TODO: Allow the metacat admin to determine the schedule
797 796
            // Set the schedule for synchronization
798 797
            Synchronization synchronization = new Synchronization();
799 798
            Schedule schedule = new Schedule();
800 799
            Date now = new Date();
801
            schedule.setYear("*");
802
            schedule.setMon("*");
803
            schedule.setMday("*");
804
            schedule.setWday("?");
805
            schedule.setHour("*");
806
            schedule.setMin("0/3");
807
            schedule.setSec("10");
800
            schedule.setYear(PropertyService.getProperty("dataone.nodeSynchronization.schedule.year"));
801
            schedule.setMon(PropertyService.getProperty("dataone.nodeSynchronization.schedule.mon"));
802
            schedule.setMday(PropertyService.getProperty("dataone.nodeSynchronization.schedule.mday"));
803
            schedule.setWday(PropertyService.getProperty("dataone.nodeSynchronization.schedule.wday"));
804
            schedule.setHour(PropertyService.getProperty("dataone.nodeSynchronization.schedule.hour"));
805
            schedule.setMin(PropertyService.getProperty("dataone.nodeSynchronization.schedule.min"));
806
            schedule.setSec(PropertyService.getProperty("dataone.nodeSynchronization.schedule.sec"));
808 807
            synchronization.setSchedule(schedule);
809 808
            synchronization.setLastHarvested(now);
810 809
            synchronization.setLastCompleteHarvest(now);

Also available in: Unified diff