Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@
import edu.harvard.iq.dataverse.search.SortBy;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.ejb.EJB;
import javax.ejb.Schedule;
import javax.ejb.Stateless;
import javax.inject.Named;
import javax.json.Json;
Expand Down Expand Up @@ -122,6 +124,17 @@ public SavedSearch save(SavedSearch savedSearch) {
return em.merge(savedSearch);
}
}


@Schedule(dayOfWeek="Sun", hour="0",minute="30")
public void makeLinksForAllSavedSearchesTimer(){
logger.info("Linking saved searches");
try {
JsonObjectBuilder makeLinksForAllSavedSearches = makeLinksForAllSavedSearches(false);
} catch (SearchException | CommandException ex) {
Logger.getLogger(SavedSearchServiceBean.class.getName()).log(Level.SEVERE, null, ex);
}
}

public JsonObjectBuilder makeLinksForAllSavedSearches(boolean debugFlag) throws SearchException, CommandException {
JsonObjectBuilder response = Json.createObjectBuilder();
Expand Down