001/*
002 * Copyright 2020 Global Biodiversity Information Facility (GBIF)
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *     http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.gbif.api.model.crawler;
017
018/**
019 * This enum lists the reasons why a crawl is finished.
020 */
021public enum FinishReason {
022  /**
023   * This status means that we were able to finish the crawl without any fatal errors and without exhausting retries.
024   * There could still have been intermittent errors but we managed to reach the end of an endpoint or a DwC-A file.
025   */
026  NORMAL,
027
028  /**
029   * This status means that the user requested an abort of the crawl and that is the reason this crawl is done.
030   */
031  USER_ABORT,
032
033  /**
034   * This status means that we had to abort the crawl for any abnormal reason (endpoint down, not a valid archive,
035   * ...). To find the exact reason(s) you need to look at the logs to see past errors.
036   */
037  ABORT,
038
039  /**
040   * Crawling has stopped because the source data was not modified since the last crawl.
041   */
042  NOT_MODIFIED,
043
044  /**
045   * This status means that we don't know why the crawl aborted. This is a sign of a programming error and should be
046   * investigated.
047   */
048  UNKNOWN
049}