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
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
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
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
4cc56f51ab
[ #76 ] Use harvest_source_show on reindex command
2014-01-14 17:04:34 +00:00
Mikko Koho
51e842ee6e
Add quotes to harvest_source_id in Solr query when clearing harvest sources
2013-11-22 11:01:26 +02:00
amercader
7b652542e7
[ #34 ] Fix harvest_source_clear action
...
Some typos in the SQL statements, and also the source needs to be
reindexed to update the status with the counts.
2013-05-16 17:33:39 +01:00
kindly
1714e55110
simplify harvest_clear queries so they do not lock on big db
2013-04-30 13:59:23 +01:00
kindly
a2b8ab1994
make harvest source clear not create table
2013-04-30 12:40:46 +01:00
kindly
dcfd201cdd
[ #32 ] redis queue support
2013-04-21 17:04:57 +01:00
amercader
5414b6c08d
Merge branch '29-new-idataset-form' into release-v2.0
2013-04-08 13:23:41 +01:00
kindly
a9b8be8f01
harvest source index clear
2013-03-28 15:36:44 +00:00
amercader
fbc8ecde97
[ #29 ] Fix some imports on actions and plugin
2013-03-28 15:00:44 +00:00
kindly
845c9927a8
add harvest source clear
2013-03-25 11:39:00 +00:00
amercader
bec31a611e
Fix empty job finished date
2013-03-06 13:42:35 +00:00
amercader
42bace3628
[ #5 ] Add new finished field for harvest job
...
When the run command flags a job as finished, it will query the most
recent harvest object for this job and use its import_finished value as
the job finishing time.
2013-01-28 17:19:28 +00:00
amercader
daa9a385ff
Update job keys changed on 9ba6e8f
2013-01-24 17:36:58 +00:00
amercader
b2b89dfd61
Add command for reindex all harvest sources
2013-01-22 16:43:36 +00:00
amercader
6df525a377
Reindex the harvest source dataset after finishing jobs
...
This ensures that the status details shown on the harvest sources search
page is up to date (as it is loaded from the indexed data_dict)
2012-12-14 14:27:55 +00:00
amercader
c1b0415cb6
Merge branch 'release-v2.0' into 2.0-dataset-sources
...
Conflicts:
ckanext/harvest/model/__init__.py
2012-12-13 18:33:59 +00:00
amercader
b424ba1cea
Add flag to avoid returning all objects when getting a job
2012-12-13 18:20:49 +00:00
amercader
0dde483992
Set job status to Finished when actually finishing it
...
Until now, harvest jobs were set to Finished just after sending all
objects to the fetch stage. Now every time the run command is run, jobs
are set to Running, and all previous Running jobs are checked to see if
all harvest objects have a state of Complete or Error. Only then the job
is flagged as Finished.
2012-12-13 18:19:22 +00:00
amercader
803b228d1c
Update harvest source create and update logic functions
...
`harvest_source_create` and `harvest_source_update` now call
`package_create` and `package_update` respectively, making sure to
define a 'harvest_source' type. The returned dict uses the db_to_form
schema.
2012-11-30 14:11:24 +00:00
amercader
9d36fd6841
First stub of the new dataset type forms
...
Adds a 'harvest_source' dataset type that mimics the original harvest
source form.
It works against the 3022 branch on CKAN core.
2012-11-29 12:31:48 +00:00
kindly
2529a17304
add jobs at certain frequencies
2012-10-29 17:15:02 +00:00
amercader
c1f83e0d3e
Strip spaces from url when creating or updating a source
2012-08-17 12:24:41 +01:00
amercader
4c562e5f5f
Do not store the object when importing
2012-08-09 11:17:41 +01:00
amercader
4d2fdeac57
Allow defining segments of harvest objects to import
...
Useful when importing large number of objects, as it allows
parallelization
2012-08-02 18:41:59 +01:00
amercader
7011efe5dc
Allow not linking to datasets when importing records
...
With the -j flag, harvest objects are not linked to datasets when
importing. This is useful sometimes when importing records for the first
time.
2012-07-30 12:11:55 +01:00
amercader
4d00e665f1
[cli] Speed up run command
2012-06-29 11:32:18 +01:00
David Read
ccf0cd3da2
Add copious logging to record what happens in harvesting.
2012-06-08 17:09:22 +01:00
amercader
4a7007460b
[logic] Fix broken imports
2012-03-07 17:08:17 +00:00
amercader
97b390f3c1
[auth,logic,ui] Handle publishers on the UI
...
Add fields for publishers in the form when using the publihser auth
profile. Some changes related to the source schema.
2012-03-06 16:01:43 +00:00
amercader
2a2397c0ed
[logic,auth] Implement publisher auth profile
...
The publisher profile allows general users to handle harvest sources
based on membership to a certain group (publisher), as opposed to the
default auth profile where only sysadmins can perform any harvesting
task.
To enable it, put this directive in your ini file:
ckan.harvest.auth.profile = publisher
TODO:
* Save publisher id / user id when creating sources
* Show publisher in form and index page
2012-03-02 16:49:39 +00:00
amercader
a35eb75440
[logic,auth] Add auth logic layer
...
The first version of the auth layer is based on the current policy, i.e.
you need to be sysadmin to perform any action.
TODO: the CLI is still not working.
2012-03-01 12:02:16 +00:00
amercader
c798013752
[logic] Refactor the rest of the logic functions (create,update,delete)
2012-02-29 15:20:35 +00:00