Commit Graph

838 Commits

Author SHA1 Message Date
amercader 3793480a91 Fix Flake8 warnings 2019-10-03 11:50:15 +02:00
amercader 5ffe6d4bfa Resend awaiting objects in the DB that are not present in Redis
This happens when there is an ongoing harvest job and the keys on redis
are deleted for some reason (eg not persistent container)
2019-10-03 11:32:48 +02:00
amercader 5ad6d866ed Mark early errored job as finished
Otherwise it's displayed as Running forever
2019-10-03 11:22:23 +02:00
amercader 8e862c8f04 Fix wrong toolkit reference 2019-10-03 11:21:44 +02:00
amercader 7ac70cd58e Remove old database migrations that targeted ancient versions
For this version it is safe to assume that is these migrations are no
longer needed. They could introduce hard to track errors as part of the
startup work they did.
2019-10-01 12:04:16 +02:00
amercader 30f19713fa Add hook to extend the package dict in CKAN harvester 2019-08-26 13:38:30 +02:00
amercader 51bf79a626 Revert back to StrictRedis client 2019-08-26 12:26:05 +02:00
amercader 8b2f2f9a24 Merge branch 'default-to-ckan.redis.url' 2019-08-23 15:46:37 +02:00
Adrià Mercader 25775ffa7b
Merge pull request #358 from ckan/ckantoolkit
Use ckantoolkit to clean up imports
2019-08-23 14:39:54 +02:00
amercader b1b284a810 Default to the ckan.redis.url setting
99.9% of cases you probably want to use the same redis instance that
CKAN core uses so it makes sense to default to that setting. If it's not
set if will default to the hardcoded values (localhost:6379/0) which is
the same default as CKAN core. If there is an existing legacy setting
(ckan.harvest.mq.hostname) those will be used.
2019-08-23 13:34:17 +02:00
Stefan Oderbolz b8cf47bb91
Merge pull request #365 from usingsky/fix-SAWarning
Fix SAWarning when tracking update from ckan
2019-07-09 07:58:49 +02:00
seitenbau-govdata b206c4cf36 Fix abort job from ui
* Fix abort job from ui which was broken by commit
ed288dca63
2019-07-01 12:19:36 +02:00
Jinil Lee 7e006e8c9e Fix SAWarning when tracking update from ckan
Warnings emitted when coercing full SQL fragments into text()
2019-06-01 18:08:11 +09:00
David Read 3a72337f1e
Merge pull request #359 from ckan/fix-model-codestyle
Code style changes to model and plugin
2019-03-18 19:55:31 +00:00
Stefan Oderbolz 8be627a454 Use ckantoolkit to avoid imports from new_test 2019-03-18 17:48:25 +01:00
Ken Tsang dfc147e6d7 Fixed codestyle in test_ckanharvester.py 2019-03-18 11:16:50 +00:00
Ken Tsang 95e6e934ac Add tests for raised errors during _get_content 2019-03-18 10:53:57 +00:00
Ken Tsang 1b609eeb60 import HTTPError to ckanharvester.py 2019-03-18 10:53:57 +00:00
Bruce Bolt 730b476c08 Fix harvest requests exceptions 2019-03-18 10:53:57 +00:00
Stefan Oderbolz ef3dc4a46a Update code style in model and plugin
This is based on the review feedback in #354
2019-03-17 22:59:15 +01:00
Jari Voutilainen 2fbac74c29 Fix importing assert_in 2019-03-06 14:12:27 +02:00
Jari Voutilainen 3aec5ed279 Fix importing, so that extensions will not break 2019-03-06 13:36:42 +02:00
Jari Voutilainen 98364723d7 Apply flake8 2019-03-06 13:19:05 +02:00
Bruce Bolt 68bf4893c4 Add an 'owner_org' to the v3 package migration
The auto-migration fails because the new package does not have an
owner organisation ID assigned, so fails validation
2018-12-03 14:13:04 +00:00
Stefan Oderbolz e66362d113
Merge pull request #344 from alphagov/tls-patches
Fix SSL problems for old versions of Python 2.7.x
2018-11-12 09:17:28 +01:00
Andrea Grandi 685843e583
Restore missing import 2018-11-01 14:00:38 +00:00
Andrea Grandi 6f82f19049
Simplify exception handling 2018-10-30 09:52:38 +00:00
Stefan Oderbolz c21c162799
Merge pull request #338 from brucebolt/fix-attribute-error
A harvester may not have an info method
2018-10-29 16:08:13 +01:00
Andrea Grandi 6b6458f2ea
Use requests lib instead of urllib2 2018-10-29 11:50:39 +00:00
amercader 204b1f301a One more fix for 2.9 2018-10-26 14:11:20 +02:00
amercader ed288dca63 Reduce usage of c vars, add more tests 2018-10-26 13:38:09 +02:00
amercader dea0bd09ad Remove unused controller 2018-10-25 15:48:42 +02:00
amercader cb5186962e Support for CKAN 2.9
Use objects from toolkit, remove old checks using missing c properties,
Add legacy routes
2018-10-25 15:39:57 +02:00
amercader 7bad691415 Add tests and docs for include/exclude groups 2018-10-25 13:04:37 +02:00
amercader 753d29d5ff Merge branch 'master' of https://github.com/etri-odp/ckanext-harvest into etri-odp-master 2018-10-25 12:47:26 +02:00
amercader b51c5f119e Merge branch 'master' of github.com:ckan/ckanext-harvest 2018-10-25 12:19:47 +02:00
amercader bdbf53caea Fix styling issues on Bootstrap 3 2018-10-25 12:19:43 +02:00
Adrià Mercader 3808d52487
Merge pull request #332 from gavinpc-mindgrub/use-redis-password
Use Redis password from configuration when present.
2018-10-25 12:18:56 +02:00
Bruce Bolt e7384106c3 A harvester may not have an info method
This fixes the error `AttributeError: 'HarvesterBase' object has
no attribute 'info'` which prevents new harvest sources from
being created.
2018-10-25 10:32:50 +01:00
Dennis Rupnow 1a63250e4b Ensures the AND operator for fq in solr 2018-08-30 16:33:55 +02:00
Gavin Cannizzaro 9f8b98e54f Use Redis password from configuration when present. 2018-07-12 10:14:24 -04:00
Stefanie Taepke cd6f75251f test if error-mails are only sent to respective org’s admins 2018-06-14 14:45:26 +02:00
Stefanie Taepke 304bbcec06 send harvest-error-mails to organization-admins 2018-06-14 11:07:49 +02:00
amercader a6cb710127 Merge branch 'error-mail' of https://github.com/stefina/ckanext-harvest into stefina-error-mail 2018-06-13 14:17:42 +02:00
Stefanie Taepke e1e6b44a44 extend TestHarvestErrorMail from FunctionalTestBase
This prevents failing tests for older versions.
2018-06-13 13:31:03 +02:00
Stefanie Taepke ad9e513c0d mock ckan.lib.mailer 2018-06-13 13:12:14 +02:00
Stefanie Taepke 00911a6924 test harvest-error-mail 2018-06-13 10:53:36 +02:00
Stefanie Taepke f965751bd5 send error-mail to sys-admins 2018-06-13 10:46:35 +02:00
Stefanie Taepke 20c9235270 use logic-actions instead of DB-Calls 2018-06-13 09:09:36 +02:00
Stefanie Taepke 5f414e2c99 add error-notifications in case of harvest-failure
requires configuration-values:
ckan.harvest.status_mail.errored = true
email_to = %comma seperated list of emails to receive the email%
error_email_from = %sender of email%
ckan.site_title = %will be included in the email%
2018-06-11 13:38:38 +02:00