amercader
04162ce9e4
Merge branch 'munge-tag'
2015-12-10 13:15:17 +00:00
David Read
4ca4b3a2f2
Merge pull request #213 from ckan/212-module-import-error
...
[#212 ] Fixes #212 - auth for harvest_job_create was broken.
2015-12-09 15:52:37 +00:00
David Read
8b8086fe48
[ #212 ] Fixes #212 - auth for harvest_job_create was broken.
2015-12-09 15:50:05 +00:00
amercader
84fb3e3325
Add support for the new ITranslation interface
...
Move the i18n files to the expected place, load the interface if CKAN >=
2.5.0
2015-12-09 14:46:12 +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
07c76b0cbf
Docs & pep8
2015-12-02 16:23:54 +00:00
David Read
121e8bd918
Merge pull request #198 from ckan/catch-exceptions
...
Catch exceptions from urllib2.urlopen more comprehensively
2015-12-02 16:22:53 +00:00
David Read
c7021933a0
Move creation of errors to the model as thats a more natural home. Provide backwards compatibility.
2015-12-02 08:15:13 +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
f67029b993
Hint about rerunning the import_stage.
2015-12-01 17:59:11 +00:00
David Read
b8c7d39e1a
Document existing functionality for aborting during the gather stage.
2015-12-01 17:56:24 +00:00
David Read
25301e2152
Update README from interfaces.py. PEP8. Mention HarvestObject - Package relation in interface.
2015-12-01 17:51:35 +00:00
David Read
b0780b2062
Fetch stage can also return "unchanged", same as the import stage. Used by DGU. It is useful to skip an object like this, to avoid saving the fetched content in a HarvestObject (saves disk usage).
2015-12-01 17:38:57 +00:00
David Read
414c33ac6b
Easy fix to stop test_queue.py using MockHarvester in test_queue2.py by mistake.
2015-12-01 16:55:42 +00:00
David Read
673a64a820
Merge pull request #200 from ckan/fix-error-report-status
...
Fix job stats key
2015-11-30 17:49:14 +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
David Read
154a3f42cd
Merge pull request #202 from metaodi/local-time-display
...
Fix name of class to enable automatic conversion of datetimes
2015-11-27 10:22:54 +00:00
Stefan Oderbolz
798866d872
Fix name of class to enable automatic conversion of datetimes
...
when ckan/ckan#2505 got finally merged, the class name to mark datetimes
with a time part that can be automatically converted to the users
timezone, changed.
This commit makes sure this change is reflected in ckanext-harvest.
2015-11-26 01:49:11 +01:00
David Read
4fbaec0986
Improve harvester type error message. Add docstring.
2015-11-25 20:58:50 +00:00
David Read
6c3efe53df
Fix job stats key - it is "errored" not "errors" - the keys are from report_status. And lots of PEP8.
2015-11-25 20:55:32 +00:00
David Read
f0a2e9fb8e
CKAN revision API returns package ids not names (for v2 of the API). This ensures harvest guid is always the ID rather than the name.
2015-11-24 16:41:43 +00:00
David Read
392c13d828
If not revisions then we get a 404, so deal with that better.
2015-11-23 21:36:45 +00:00
David Read
4405066fab
Catch exceptions from urllib2.urlopen more comprehensively. I think 400 errors were from CKAN 0.6 or something like that - ignore now.
2015-11-23 21:26:32 +00:00
David Read
4b5014d381
Fix test for older ckan.
2015-11-23 18:27:04 +00:00
David Read
3b4daf0609
fix typo
2015-11-23 17:40:35 +00:00
David Read
bc26159fb6
tag_munge from ckan 2.2 fails the test with dashes, so use the harvest one for this ckan version.
2015-11-23 17:31:20 +00:00
David Read
52f7e0dd07
Use the ckan version of munge_tag if available, but provide a fallback for older ckans.
2015-11-23 12:48:05 +00:00
David Read
d1476e6f7a
Merge pull request #196 from metaodi/enable-custom-update-detection
...
Provide extension point to detect existing packages
2015-11-20 16:23:38 +00:00
Stefan Oderbolz
129b1a0cf5
Enable custom solution to detect existing packages
...
With this change, all harvesters that extend the base harvester have the
possibility to use the very useful create_or_update method, but still
define their own way of detecting what package is the existing one.
This is very useful for harvest sources that have no knowledge of the
CKAN internal id, but have another way of finding previous package.
2015-11-20 16:31:47 +01:00
amercader
e71cf35504
Fix queue tests
2015-11-20 14:25:31 +00:00
amercader
f1ba2bcfb3
Namespace Redis keys to avoid conflicts between instances
...
The `ckan.site_id` config option (or `default` if missing) is used to
namespace the Redis keys: routing key and persistance key. Consumers
will only get the relevant keys for their instance.
2015-11-20 14:17:25 +00:00
amercader
920df684ae
Merge branch 'db-error'
2015-11-20 12:29:37 +00:00
amercader
ede50aa3fb
Merge branch 'immediate-harvest'
2015-11-20 12:28:35 +00:00
amercader
3f42eb6ba0
Merge branch 'revision-id-fix'
...
Conflicts:
ckanext/harvest/tests/harvesters/test_ckanharvester.py
2015-11-20 12:28:17 +00:00
amercader
1b0bb910a5
Merge branch '180-fix-modified-date'
...
Conflicts:
ckanext/harvest/harvesters/ckanharvester.py
ckanext/harvest/tests/harvesters/test_ckanharvester.py
2015-11-20 12:27:11 +00:00
amercader
36babfb26a
Merge branch 'yhteentoimivuuspalvelut-job-reporting-fixes'
2015-11-20 12:20:32 +00:00
David Read
60c4371df4
Add "not modified" to the stats always returned.
2015-11-17 12:45:00 +00:00
David Read
ae7c500745
Merge branch 'master' into yhteentoimivuuspalvelut-job-reporting-fixes
2015-11-17 12:35:59 +00:00
David Read
cc79eeb942
Merge pull request #192 from metaodi/consistent-api-response
...
Make sure all status keys are always returned
2015-11-17 12:34:27 +00:00
Stefan Oderbolz
8e02aedc65
Fix tests
2015-11-17 13:29:25 +01:00
Stefan Oderbolz
f9b87fff0c
Make sure all possible status are always returned
...
It makes it harded to parse the API response if you always have to check
if 'deleted' is set and if what value it has. I think to simply return 0
for all status value is good practice.
2015-11-17 11:43:11 +01:00
David Read
5f96346487
Merge pull request #191 from raphaelstolt/master
...
Catch JSONDecodeError when no JSON content
2015-11-16 11:42:32 +00:00
Raphael Stolt
084723abb7
Catch JSONDecodeError when no JSON content
2015-11-16 10:59:18 +01:00
David Read
6415cdd740
Merge pull request #190 from ckan/metaodi-harvest-source-patch
...
Metaodi harvest source patch
2015-11-13 13:52:09 +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
42ab55cb6d
No longer need uuid since we clear db between tests now. Added ignore_missing because of occasional failures.
2015-11-13 13:32:55 +00:00