dbca-wa / tsc

Threatened Species and Communities
https://dbca-wa.github.io/tsc/
MIT License
1 stars 0 forks source link

Automate Taxon refresh #89

Open florianm opened 4 years ago

florianm commented 4 years ago

Create a GH repo with the R script

gjprod <- function(data, ser) upsert_geojson(data, serializer = ser, api_url = prod, chunksize = 1000)
"public:herbie_hbvsupra_public" %>% gs_getFeature() %>% gjprod("supra")
"public:herbie_hbvgroups_public" %>% gs_getFeature() %>% gjprod("groups")
"public:herbie_hbvnames_public" %>% gs_getFeature() %>% gjprod("names")
"public:herbie_hbvfamilies_public" %>% gs_getFeature() %>% gjprod("families")
"public:herbie_hbvgenera_public" %>% gs_getFeature() %>% gjprod("genera")
"public:herbie_hbvspecies_public" %>% gs_getFeature() %>% gjprod("species")
"public:herbie_hbvxrefs_public" %>% gs_getFeature() %>% gjprod("xrefs")
"public:herbie_hbtparents_public" %>% gs_getFeature() %>% gjprod("parents")
"public:herbie_hbvvernaculars_public" %>% gs_getFeature() %>% gjprod("vernaculars")

# curl https://tsc.dbca.wa.gov.au/tasks/update-taxon/ -H 'Authorization: Token xxx'
# mind that this will run for 1h+ - do not expect a return
# update-taxon will notify via Sentry logger.warning("Success: rebuild taxon")

Automate via travis scheduled builds: