From 200bc980e5248239988a2230685776a866c00d43 Mon Sep 17 00:00:00 2001 From: Eugene Burmakin Date: Thu, 3 Oct 2024 15:12:19 +0200 Subject: [PATCH] Add cronjob to run Import::WatcherJob every 1 hour --- CHANGELOG.md | 10 ++++++++++ config/initializers/00_monkey_patching.rb | 15 --------------- config/schedule.yml | 5 +++++ 3 files changed, 15 insertions(+), 15 deletions(-) delete mode 100644 config/initializers/00_monkey_patching.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index 7eb9e7c9..5bf540cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +# 0.15.0 - 2024-10-03 + +### Added + +- You can now put your GPX and GeoJSON files to `tmp/imports/watched` directory and Dawarich will automatically import them. This is useful if you have a service that can put files to the directory automatically. The directory is being watched every 60 minutes for new files. + +### Changed + +- Monkey patch for Geocoder to support http along with https for Photon API host was removed becausee it was breaking the reverse geocoding process. Now you can use only https for the Photon API host. This might be changed in the future + # [0.14.7] - 2024-10-01 ### Fixed diff --git a/config/initializers/00_monkey_patching.rb b/config/initializers/00_monkey_patching.rb deleted file mode 100644 index 89c73c2d..00000000 --- a/config/initializers/00_monkey_patching.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -# By default, Geocoder supports only https protocol when talking to Photon API. -# This is kinda inconvenient when you're running a local instance of Photon -# and want to use http protocol. This monkey patch allows you to do that. - -module Geocoder::Lookup - class Photon < Base - private - - def supported_protocols - %i[https http] - end - end -end diff --git a/config/schedule.yml b/config/schedule.yml index 487c7bf9..3515735b 100644 --- a/config/schedule.yml +++ b/config/schedule.yml @@ -14,3 +14,8 @@ visit_suggesting_job: cron: "0 1 * * *" # every day at 1:00 class: "VisitSuggestingJob" queue: default + +watcher_job: + cron: "0 */1 * * *" # every 1 hour + class: "Import::WatcherJob" + queue: default