Skip to content

Commit

Permalink
fix: do not trigger redlist species timestamp automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Feist committed Dec 9, 2021
1 parent 3c44b75 commit 86fb988
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 1.4.1

* Do not automatically update the Redlist species timestamp.
* Add docs in readme on how to trigger a timestamp update.

## 1.4.0

* Automate update of Redlist Species last updated timestamp by using a dotfile
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,9 @@ fails for some reason. The deployment TASK hook has this functionality.

* Ensure you have the latest `main` with `git checkout main; git pull origin main`
* Deploy with `bundle exec cap production deploy TASK=import:refresh`

## Update Redlist species timestamp

To update the timestmap, just run `bundle exec rake import:update_redlist_timestamp`
on the server. You can also run `bundle exec cap production deploy TASK=import:update_redlist_timestamp`
to do this from your own machine, but it will include a new deploy.
6 changes: 5 additions & 1 deletion lib/tasks/import_new_redlist_data.rake
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ namespace :import do
import_for_countries
import_for_regions
end
RedlistSpeciesLastUpdated.touch!
end

desc 'import habitats occurrences'
Expand All @@ -27,6 +26,11 @@ namespace :import do
end
end

desc 'update Redlist species last updated timestamp'
task update_redlist_timestamp: [:environment] do
RedlistSpeciesLastUpdated.touch!
end

def import_for_countries
species_filename = 'lib/data/iucn_redlist/country_species.csv'
prev_iso = nil
Expand Down

0 comments on commit 86fb988

Please sign in to comment.