mirror of
https://github.com/internetarchive/heritrix3.git
synced 2026-09-23 06:05:46 +00:00
Merge pull request #227 from nlevitt/dont-checkpoint-unstarted
do not checkpoint if crawl job has not started
This commit is contained in:
@@ -240,6 +240,11 @@ public class CheckpointService implements Lifecycle, ApplicationContextAware, Ha
|
||||
* Run a checkpoint of the crawler
|
||||
*/
|
||||
public synchronized String requestCrawlCheckpoint() throws IllegalStateException {
|
||||
if (!controller.hasStarted()) {
|
||||
LOGGER.info("crawl job has not started; ignoring");
|
||||
return null;
|
||||
}
|
||||
|
||||
if (isCheckpointing()) {
|
||||
throw new IllegalStateException("Checkpoint already running.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user