Closed mikedonnici closed 5 years ago
Issue is with fixr
:
Try pubdate: 2019 May 27
Best publish date: 2019-5-27
panic: interface conversion: interface {} is nil, not map[string]interface {}
goroutine 1 [running]:
main.(*resourceData).pubmedData(0xc000221c10, 0xc00049ea48, 0x8)
/tmp/build_fcfcb14ab90c677bb20487b31309494d/cmd/fixr/main.go:547 +0x8f8
main.updatePubmedData()
/tmp/build_fcfcb14ab90c677bb20487b31309494d/cmd/fixr/main.go:470 +0x1a2
main.main()
/tmp/build_fcfcb14ab90c677bb20487b31309494d/cmd/fixr/main.go:127 +0x273
This runs OK:
fixr -b 1 -t "fixResources"
This throws the error:
fixr -b 1 -t "pubmedData"
.. so issue is with date conversion for this task.
Found the problem!
Is a rate limit for the calls to pubmedData(articleD)
, response:
{
"error": "API rate limit exceeded",
"api-key": "2001:8000:10a4:6b00:adb0:f0d:a280:d715",
"count": "4",
"limit": "3"
}
This is a new thing: https://www.ncbi.nlm.nih.gov/books/NBK25497/
On December 1, 2018, NCBI will begin enforcing the use of API keys that will offer enhanced levels of supported access to the E-utilities. After that date, any site (IP address) posting more than 3 requests per second to the E-utilities without an API key will receive an error message. By including an API key, a site can post up to 10 requests per second by default. Higher rates are available by request (vog.hin.mln.ibcn@seitilitue). Users can obtain an API key now from the Settings page of their NCBI account (to create an account, visit http://www.ncbi.nlm.nih.gov/account/). After creating the key, users should include it in each E-utility request by assigning it to the new api_key parameter.
Created an API Key and added a hard-coded 100ms delay between requests to ensure no more than 10 requests per second.
There seem to be a few issues when the scheduled workers are run, output below: