From 72a25e36a5d4373259b7137b3adff11e9ea3e52a Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Sun, 16 Dec 2018 08:06:49 +0100 Subject: [PATCH] rescue ActiveRecord::LockWaitTimeout errors on import --- app/models/doi.rb | 2 +- vendor/middleman/source/index.html.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/doi.rb b/app/models/doi.rb index 522165095..95be1204c 100644 --- a/app/models/doi.rb +++ b/app/models/doi.rb @@ -383,7 +383,7 @@ def self.import_by_day(options={}) end.to_h.merge(schema_version: meta["schema_version"] || "http://datacite.org/schema/kernel-4", version_info: meta["version"], xml: string) doi.update_columns(attrs) - rescue TypeError, NoMethodError => error + rescue TypeError, NoMethodError, ActiveRecord::LockWaitTimeout => error logger.error "[MySQL] Error importing metadata for " + doi.doi + ": " + error.message else count += 1 diff --git a/vendor/middleman/source/index.html.md b/vendor/middleman/source/index.html.md index 9551ff08d..96aad702e 100644 --- a/vendor/middleman/source/index.html.md +++ b/vendor/middleman/source/index.html.md @@ -5,6 +5,6 @@ description: The API to interact with all DataCite resources. --- The DataCite REST API allows users to interact with DataCite resources such as dois, clients, providers and prefixes. Please use -[DataCite Search](https://search.datacite.org) or [DOI Fabrica](https://doi.datacite.org) (for members and clients) if you are looking for a web interface. The API follows the [JSONAPI](http://jsonapi.org/) specification. The API requires authentication for some actions. +[DataCite Search](https://search.datacite.org) or [DOI Fabrica](https://doi.datacite.org) (members and clients) if you are looking for a web interface. The API follows the [JSONAPI](http://jsonapi.org/) specification, and requires authentication for some actions. You will find more information about the REST API in our [documentation portal](https://support.datacite.org/docs/api).