<% content_for :title, "Background jobs" %>

Background jobs

<%= render 'settings/navigation' %>

Start Reverse Geocoding

This job will re-run reverse geocoding process for all the points in your database. Might take a few days or even weeks based on the amount of points you have!

<%= link_to 'Start Job', settings_background_jobs_path(job_name: 'start_reverse_geocoding'), method: :post, data: { turbo_confirm: 'Are you sure?', turbo_method: :post }, class: 'btn btn-primary' %>

Continue Reverse Geocoding

This job will process reverse geocoding for all points that don't have geocoding data yet.

<%= link_to 'Start Job', settings_background_jobs_path(job_name: 'continue_reverse_geocoding'), method: :post, data: { turbo_confirm: 'Are you sure?', turbo_method: :post }, class: 'btn btn-primary' %>

Background Jobs Dashboard

This will open the background jobs dashboard in a new tab.

<%= link_to 'Open Dashboard', '/sidekiq', target: '_blank', class: 'btn btn-primary' %>

Visits suggestions

Enable or disable visits suggestions. It's a background task that runs every day at midnight. Disabling it might be useful if you don't want to receive visits suggestions or if you're using the Dawarich iOS app, which has its own visits suggestions.

<% if current_user.safe_settings.visits_suggestions_enabled? %> <%= link_to 'Disable', settings_path(settings: { 'visits_suggestions_enabled' => 'false' }), method: :patch, data: { turbo_confirm: 'Are you sure?', turbo_method: :patch }, class: 'btn btn-error' %> <% else %> <%= link_to 'Enable', settings_path(settings: { 'visits_suggestions_enabled' => 'true' }), method: :patch, data: { turbo_confirm: 'Are you sure?', turbo_method: :patch }, class: 'btn btn-success' %> <% end %>