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
amercader
2f4adfb338
Merge branch 'tests'
2015-10-23 13:18:15 +01:00
David Read
dc7af5d150
Remove prints.
2015-10-21 16:38:03 +00:00
David Read
f70c16bce7
Add framework for testing harvesters. Modernize existing tests.
2015-10-21 16:26:57 +00:00
David Read
2da918c2e4
Fix migration for old harvests so that ones that errored are correctly marked. Added helpful comments in model.
2015-07-22 10:13:02 +01:00
kindly
c2283e3fdb
only migrate harvest sources which are active
2013-06-28 02:32:45 +01:00
amercader
1792180e4f
Better harvest source dataset migration
...
Current implementation only checked for the first source to exist and
didn't allow to rerun the migration for other sources if there was an
error. With the new one, all non existing sources are migrated each
time.
2013-05-24 14:49:55 +01:00
amercader
1d54edfdaa
Fix bug in source datasets migration
...
Wrong dataset type was causing the default package schema to be used,
thus failing when providing an id.
2013-05-24 14:25:05 +01:00
joetsoi
cb8b808274
sanity check that harvest source id matches harvest dataset id
...
remove author_email, license_id, maintainer_email, maintainer and
author from pacakge_dict, these were not actually necessary
2013-03-29 00:59:20 +00:00
joetsoi
548d3c1c2a
fix validation issue on db upgrade
2013-03-25 12:02:07 +00:00
amercader
5956e5a9d5
Merge branch '4-new-auth-for-2.0' into 5-improve-job-errors-reporting
2013-02-05 12:36:26 +00:00
amercader
ca7819b885
Merge branch 'release-v2.0' into 2.0-dataset-sources
2013-02-05 12:35:14 +00:00
amercader
cca554c5ec
Fix typo and add missing column on v3 migration script
2013-02-05 12:33:56 +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
fdac761fba
Merge branch 'release-v2.0' into 2.0-dataset-sources
...
Conflicts:
ckanext/harvest/logic/action/get.py
ckanext/harvest/tests/test_queue.py
2012-12-20 16:16:30 +00:00
kindly
6b42d96fe0
add report_status field
2012-12-17 23:50:26 +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
d57e73458a
Make harvest object - package FK deferrable
...
Allows eg to add the harvest object id to the package dict before
indexing.
2012-12-13 18:21:40 +00:00
amercader
fcbe6aa6de
Script for creating harvest source datasets on old versions
...
The way we check whether datasets need to be created might need to be
improved.
2012-12-05 18:54:28 +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
amercader
c52ed3b163
Add line field to object error table
2012-11-20 11:29:58 +00:00
amercader
03fd1884f4
Implement retry times for harvest objects
2012-11-15 18:11:35 +00:00
amercader
820443d58f
Add cascade option to harvest object extras and errors
2012-11-09 14:52:34 +00:00
kindly
6db65b5826
made manual default not null
2012-11-05 13:17:32 +00:00
amercader
a136cbf202
Fix typos in migration script
2012-10-30 17:52:10 +00:00
kindly
9fc0ae9937
add next run field
2012-10-26 10:50:35 +01:00
kindly
bc079c6644
model upgrade with tests and migration
2012-10-25 19:01:54 +01:00
amercader
e4b3cb440c
Do not use repo.are_tables_created
...
When checking whether the core tables have been alredy created it is
best to use package_table.exists(), as are_tables_created reflects the
tables, causing conflicts with other extensions.
This allows ckanext-harvest and ckanext-spatial to be used together on
ckan 1.8 onwards.
2012-08-09 11:06:05 +01:00
Sean Hammond
528e98120c
[ #2533 ] Fix some imports broken by ckan cleanups
2012-06-15 12:08:35 +02:00
David Read
ccf0cd3da2
Add copious logging to record what happens in harvesting.
2012-06-08 17:09:22 +01:00
amercader
4c81c7c3a7
[ #1726 ][model] Harvest source reference compatibility
...
The 'source' property of harvest objects now comes from the actual
foreign key. For compatibility with old harvesters, an before insert
event listener has beeen added to check if the source id has been set,
and set it automatically from the job if not.
Note that this requires SQLAlchemy 0.7 (ie CKAN 1.5.1)
2012-02-01 12:52:52 +00:00
amercader
004210935a
[model] Avoid unicode warning
2012-02-01 11:10:44 +00:00
amercader
b64d97118c
[ #1726 ][model] Add scripts for populating source_id and current fields
2012-02-01 11:08:41 +00:00
amercader
d1783f5415
[model] Changes in harvest model
...
Added three changes to the harvest model:
* 'title' column in harvest_source table
* 'current' column in harvest_job table
* foreign key from harvest_object to harvest_source
Tables are checked on startup to see if they need to be updated.
TODO: populate current and harvest_source_id fields
2012-01-30 18:38:35 +00:00
amercader
f086e908bc
[model] Clearer table initialization
2012-01-30 17:09:28 +00:00
David Read
dd00e98d9d
[model]: More careful about creating tables, since paster db upgrade loads the envrionment and therefore runs setup() before it does the migrations, and therefore in this instance we do not want to create the db tables.
2011-08-10 16:25:57 +01:00
Friedrich Lindenberg
0d9d1f8096
reduce number of queries for harvest index to a less insane number. still heavy.
2011-06-13 17:36:35 +02:00
David Raznick
264b606c48
take tables out of global scope at import time
2011-05-31 18:02:07 +01:00
Adrià Mercader
bbe459527f
[forms] Major refactoring of the harvest forms. Forms no longer use the DGU form
...
API, and are handled similarly to the new ones on CKAN core (logic, schema,
validators...). The UI is also more consistent with the CKAN one.
2011-05-13 14:17:58 +01:00
Adrià Mercader
26cdc1089d
Change date definitions in Harvest Objects. reference_date -> metadata_modified_date, created -> gathered
2011-05-11 17:07:05 +01:00
Adrià Mercader
329ca2dd29
Add a reference date to the Harvest Objects. This must be set during the harvest
...
process.
2011-05-10 11:05:44 +01:00
Adrià Mercader
e3a83ea14d
Source URL not unique
2011-04-15 18:28:38 +01:00
David Raznick
9018beeedb
use create_all instead of create
2011-04-15 12:19:24 +01:00
Adrià Mercader
e2faa14b8d
[refactoring] Save gathering starting and finishing time
2011-04-11 16:29:47 +01:00
Adrià Mercader
2588352bc5
[refactoring] Simplify model relations
2011-04-08 16:48:29 +01:00
Adrià Mercader
90ae9d27db
[refactoring] Tweaks in the model and a setup function to create the tables
2011-04-07 16:57:36 +01:00
Adrià Mercader
4023bb7222
[refactoring] Use the common functions in the web interface.
...
Not yet implemented in create and edit harvest source as they use the DGU forms API.
Also TODO, think of what report info is needed in the listing and details page.
2011-04-05 13:39:23 +01:00
Adrià Mercader
dca4ff328f
[refactoring] Add missing column in error table
2011-04-05 12:53:36 +01:00
Adrià Mercader
a4d93e4ad3
[refactoring] Add a reference to objects from jobs
2011-04-05 12:36:27 +01:00
Adrià Mercader
ce86cfde1b
[refactoring] Clean up the model definitions
2011-04-05 11:51:59 +01:00