Commit Graph

118 Commits

Author SHA1 Message Date
amercader 6354ad5656 Fix source clean command on CKAN > 2.5, as related don't exist any more 2016-02-04 13:40:02 +00:00
amercader 468a195a25 Merge branch 'import-guid' 2015-12-10 13:37:23 +00:00
amercader 5ff3ef9d17 Merge branch '205-inconsistent-stats' 2015-12-10 13:36:15 +00:00
amercader b7a0343763 Merge branch 'abort-by-job' 2015-12-10 13:22:40 +00:00
amercader 80b82ee968 Merge branch 'factory-job' 2015-12-10 13:18:19 +00:00
amercader 52fe7fb21d Merge branch 'named-exceptions' 2015-12-10 13:17:18 +00:00
David Read 8b8086fe48 [#212] Fixes #212 - auth for harvest_job_create was broken. 2015-12-09 15:50:05 +00:00
David Read 031e680b6c Add option to re-import based on guid. 2015-12-08 16:17:39 +00:00
David Read 18169c5133 [#205] "detailed" removed in a couple of other benign places. 2015-12-08 10:18:36 +00:00
David Read 05d4baf040 [#205] "detailed" source status is removed. Now we have lost harvest_source_for_a_dataset it is not possible to call it. And it returned the wrong keys anyway. 2015-12-08 10:14:15 +00:00
David Read 67366093fe [#205] Remove harvest_source_for_a_dataset action. It has been deprecated since Mar 6 16:54:33 2013 and returns wrong harvest stats keys. 2015-12-08 10:06:42 +00:00
David Read b53682f267 You can abort a job by specifying the ID of the job, rather than the source. This is helpful since the "harvest run" command returns a list of still running job ids. 2015-12-02 07:59:08 +00:00
David Read 8163ec4d39 HarvestObject factory was creating a extra field containing the job, by mistake. PEP8 2015-11-27 14:21:16 +00:00
David Read 1f947471eb Take advantage of named exceptions. 2015-11-27 11:57:40 +00:00
amercader ede50aa3fb Merge branch 'immediate-harvest' 2015-11-20 12:28:35 +00:00
David Read ae7c500745 Merge branch 'master' into yhteentoimivuuspalvelut-job-reporting-fixes 2015-11-17 12:35:59 +00:00
David Read c0a865e64e Revert ok_ - makes it slightly less readable for little benefit. 2015-11-13 13:45:56 +00:00
David Read 1288a4d9e7 Reflow text to 79 char width. Warning not necessary with an exception I think. 2015-11-13 12:32:13 +00:00
Stefan Oderbolz 0ce3748153 Do not use ActionError as this does not yet exist in CKAN 2.2 2015-11-13 12:01:19 +01:00
Stefan Oderbolz c33c6e8c13 Raise an error instead of falling back to harvest_source_update
As the behaviour of *_patch is clearly different from the *_update we
should raise an error if this action is called on a CKAN instance, where
the action is not available.
2015-11-13 11:41:53 +01:00
Stefan Oderbolz 136fcb87d5 Make sure package_patch has a fallback for package_update on CKAN < 2.3 2015-11-11 11:37:23 +01:00
Stefan Oderbolz 3f09010039 Add harvest_source_patch to API 2015-11-11 05:39:29 +01:00
David Read 679ed421e9 Merge branch 'master' of github.com:ckan/ckanext-harvest into immediate-harvest
Conflicts:
	ckanext/harvest/logic/action/update.py
2015-11-04 09:44:05 +00:00
David Read f0207ad38f Merge branch 'master' of github.com:ckan/ckanext-harvest into yhteentoimivuuspalvelut-job-reporting-fixes 2015-11-04 09:36:55 +00:00
David Read 1ccb0dae44 A few more PEP8 changes taken from #174. 2015-11-03 22:12:49 +00:00
David Read 4f71612002 PEP8 based on #174 2015-11-03 20:30:11 +00:00
David Read 8a7bc9e1d8 Merge remote-tracking branch 'origin/master' into immediate-harvest
Conflicts:
	README.rst
	ckanext/harvest/commands/harvester.py
	ckanext/harvest/logic/action/create.py
	ckanext/harvest/logic/action/update.py
	ckanext/harvest/logic/auth/update.py
2015-11-03 00:40:25 +00:00
David Read e59760fefe Merge branch 'job-reporting-fixes' of https://github.com/yhteentoimivuuspalvelut/ckanext-harvest into yhteentoimivuuspalvelut-job-reporting-fixes 2015-11-02 21:25:32 +00:00
David Read f1d2d5fdc4 [#111] Run jobs straight away. 2015-10-28 21:58:36 +00:00
David Read 421e6da660 Add run_test, job_abort, source commands
* run_test - for running a whole harvest on the command-line
* job_abort - for aborting a limbo job
* source - for showing a single harvest source
* allowing a source to be specified by name in several commands
2015-10-28 17:51:58 +00:00
David Read f70c16bce7 Add framework for testing harvesters. Modernize existing tests. 2015-10-21 16:26:57 +00:00
David Read 6360681a8f [#105] Fix order of deletes, as agreed with @florianm. 2015-10-12 15:57:27 +01:00
Florian Mayer a6cdda0a14 set max version to 2.4.99 2015-08-19 08:41:42 +00:00
florianm 1905caa961 upgrade harvest_source_clear to not delete from authz models removed in migration 078 2015-08-19 10:25:20 +08:00
Stefan Oderbolz ab76830e85 [#145] Throw + catch a custom exception if there are no jobs to run
If there are no harvesting jobs to run, there was always an ugly
exception message when using the paster command. This replaces the ugly
output with a proper message and uses a custom exception to allow others
to deal with this error differently.
2015-07-20 18:41:50 +02:00
Stefan Oderbolz 4dc2f7367d [#139] Delete package relationships when clearing a harvest source 2015-06-26 17:20:23 +02:00
amercader f72d6da521 Change toolkit import
Apparently on package installs this is not well supported

from ckan.plugins.toolkit import check_ckan_version

But this works:

from ckan.plugins import toolkit

toolkit.check_ckan_version(...
2015-03-19 12:48:46 +00:00
clementmouchet ead9e67a33 updated def harvest_source_clear() to delete resource views, resource revisions & resources in CKAN >= 2.3 2015-02-23 17:02:21 +00:00
clementmouchet 82c7988bf3 Removed ResourceGroup from query when using CKAN 2.3 or above 2014-12-12 13:10:40 +00:00
amercader 098b54f1e5 Merge branch 'clear-source-delete-related' of https://github.com/waldvogel/ckanext-harvest into waldvogel-clear-source-delete-related 2014-09-29 13:49:19 +01:00
amercader e60e2eee03 Fix output for harvest_source_create/update
They were using an incorrect schema, so not returning a harvest source
like dict.
2014-09-29 12:43:37 +01:00
waldvogel c9b4e10506 delete records from related and related_dataset when clearing source 2014-09-12 10:56:37 +02:00
Jari Voutilainen 1e0376cff6 fix typo 2014-09-10 10:33:13 +03:00
Jari Voutilainen f6c1456abe fix job reporting to have job finished timestamp when there was zero datasets to gather 2014-09-10 09:22:55 +03:00
amercader 13dbb1eea4 Fix variable not defined 2014-07-30 15:49:02 +01:00
amercader 58a873ac7a [#91] Remove config fields from source dict before indexing
We don't need them and will avoid indexing errors
2014-06-27 16:54:39 +01:00
amercader a59ab4b5ff [#91] Consolidate all harvest source reindex code in a single action
Make it available to users with permissions on the harvest source
2014-06-27 16:48:14 +01:00
amercader 7459358fa1 Support for single import commands
We are now able to run `paster harvester import` for a single harvest
object or for a single dataset, providing ids or name.
2014-05-15 16:30:30 +01:00
amercader 43f1d08255 [#97] Persitent endpoint for datasets harvest objects
Contrary to `/harvest/object/xxx`, this endpoint is passed the dataset
id, thus it not depends on a particular object but the most recent one.
2014-04-30 17:45:07 +01:00
amercader 4cc56f51ab [#76] Use harvest_source_show on reindex command 2014-01-14 17:04:34 +00:00