geonode.harvesting.admin

Attributes

logger

Classes

HarvesterAdmin

AsynchronousHarvestingSessionAdmin

HarvestableResourceAdmin

Functions

_worker_config_changed(→ bool)

Module Contents

geonode.harvesting.admin.logger[source]
class geonode.harvesting.admin.HarvesterAdmin[source]

Bases: django.contrib.admin.ModelAdmin

form[source]
list_display = ('id', 'status', 'name', 'scheduling_enabled', 'remote_available',...[source]
list_filter = ('status',)[source]
readonly_fields = ('status', 'remote_available', 'last_checked_availability',...[source]
list_editable = ('scheduling_enabled',)[source]
actions = ['update_harvester_availability', 'initiate_update_harvestable_resources',...[source]
save_model(request, harvester: geonode.harvesting.models.Harvester, form, change)[source]
get_form(request, obj=None, change=False, **kwargs)[source]
update_harvester_availability(request, queryset)[source]
initiate_update_harvestable_resources(request, queryset)[source]
initiate_abort_update_harvestable_resources(request, queryset)[source]
initiate_perform_harvesting(request, queryset)[source]
initiate_abort_perform_harvesting(request, queryset)[source]
reset_harvester_status(request, queryset)[source]
get_time_until_next_availability_update(harvester: geonode.harvesting.models.Harvester)[source]
get_time_until_next_refresh(harvester: geonode.harvesting.models.Harvester)[source]
get_time_until_next_harvesting(harvester: geonode.harvesting.models.Harvester)[source]
get_num_harvestable_resources(harvester: geonode.harvesting.models.Harvester)[source]
get_worker_specific_configuration(harvester: geonode.harvesting.models.Harvester)[source]
class geonode.harvesting.admin.AsynchronousHarvestingSessionAdmin[source]

Bases: django.contrib.admin.ModelAdmin

list_display = ('id', 'session_type', 'status', 'started', 'updated', 'ended', 'harvester',...[source]
readonly_fields = ('id', 'session_type', 'status', 'started', 'updated', 'ended', 'harvester',...[source]
has_add_permission(request)[source]
class geonode.harvesting.admin.HarvestableResourceAdmin[source]

Bases: django.contrib.admin.ModelAdmin

list_display = ('id', 'last_refreshed', 'last_harvesting_succeeded', 'last_harvested', 'unique_identifier',...[source]
readonly_fields = ('unique_identifier', 'title', 'harvester', 'last_updated', 'last_refreshed', 'last_harvested',...[source]
list_filter = ('harvester', 'should_be_harvested', 'last_updated', 'remote_resource_type', 'last_harvesting_succeeded')[source]
search_fields = ('title',)[source]
list_editable = ('should_be_harvested',)[source]
actions = ['toggle_should_be_harvested', 'initiate_harvest_selected_resources'][source]
delete_queryset(request, queryset)[source]

Re-implemented to assure individual instance’s delete() method is called.

HarvestableResource.delete() has some custom logic to check whether the related GeoNode resource should also be deleted. Therefore we don’t want Django to potentially optimize this into performing the deletion on the DB, as that would not run our custom logic.

Further info:

https://docs.djangoproject.com/en/3.2/topics/db/queries/#deleting-objects

toggle_should_be_harvested(request, queryset)[source]
initiate_harvest_selected_resources(request, queryset)[source]
geonode.harvesting.admin._worker_config_changed(form) bool[source]