Move the harvesters cron job.
This commit is contained in:
parent
724c7a3aeb
commit
32008a64f3
|
@ -33,6 +33,8 @@ ckan_dcat_name: 'dcat dcat_json_interface'
|
|||
|
||||
# Set this to true to install a cron job that regularly runs the harvesters
|
||||
ckan_harvester_run: False
|
||||
ckan_harvester_cron_min: 0
|
||||
ckan_harvester_cron_hour: '*'
|
||||
ckan_pdfview: False
|
||||
ckan_ckanext_pdfview_url: ckanext-pdfview
|
||||
ckan_privatedatasets: False
|
||||
|
|
|
@ -8,8 +8,26 @@
|
|||
notify: Reconfigure the supervisor daemon
|
||||
tags: [ 'ckan', 'ckan_harvest' ]
|
||||
|
||||
- name: Remove the old harvester cron job
|
||||
ansible.builtin.cron:
|
||||
name: "CKAN harvester"
|
||||
minute: "{{ ckan_harvester_cron_min }}"
|
||||
job: "{{ ckan_virtenv }}/bin/paster --plugin=ckanext-harvest harvester run --config={{ ckan_config_file }} > {{ ckan_logdir }}/harvester_run.log 2>&1"
|
||||
user: {{ ckan_shell_user }}
|
||||
state: absent
|
||||
when: ckan_harvester_run
|
||||
tags: [ 'ckan', 'ckan_harvest', 'ckan_harvest_cron' ]
|
||||
|
||||
- name: Install a cron job that run the harvesters
|
||||
cron: name="CKAN harvester" minute="0" job="{{ ckan_virtenv }}/bin/paster --plugin=ckanext-harvest harvester run --config={{ ckan_config_file }} > {{ ckan_logdir }}/harvester_run.log 2>&1" user={{ ckan_shell_user }}
|
||||
ansible.builtin.cron:
|
||||
name: "CKAN harvester"
|
||||
minute: "{{ ckan_harvester_cron_min }}"
|
||||
hour: "{{ ckan_harvester_cron_hour }}"
|
||||
job: "{{ ckan_virtenv }}/bin/paster --plugin=ckanext-harvest harvester run --config={{ ckan_config_file }} > {{ ckan_logdir }}/harvester_run.log 2>&1"
|
||||
user: {{ ckan_shell_user }}
|
||||
state: present
|
||||
disabled: no
|
||||
cron_file: ckan_harvesters
|
||||
when: ckan_harvester_run
|
||||
tags: [ 'ckan', 'ckan_harvest', 'ckan_harvest_cron' ]
|
||||
|
||||
|
|
Loading…
Reference in New Issue