mirror of
https://github.com/internetarchive/heritrix3.git
synced 2026-11-08 23:13:28 +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:
1 file changed
+5
@@ -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