From 8042dcad0c61110111949a856c935325ca65f8ef Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Sun, 7 Nov 2021 12:29:06 -0700 Subject: Refactor project to new name The name of the project is being refactored from Privacy Revolver to Farside. The reasoning behind this is: 1. A shorter name is easier to remember 2. It can stand for "FOSS alternative redirecting service" (which I know doesn't encapsulate all letters from "farside", but it's close enough). This commit also includes improvements to the update script for determining how far along the script is. --- update.exs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'update.exs') diff --git a/update.exs b/update.exs index 9ed320d..fe1445b 100644 --- a/update.exs +++ b/update.exs @@ -8,9 +8,9 @@ defmodule Service do end defmodule Instances do - @fallback_str Application.fetch_env!(:privacy_revolver, :fallback_str) - @update_file Application.fetch_env!(:privacy_revolver, :update_file) - @services_json Application.fetch_env!(:privacy_revolver, :services_json) + @fallback_str Application.fetch_env!(:farside, :fallback_str) + @update_file Application.fetch_env!(:farside, :update_file) + @services_json Application.fetch_env!(:farside, :services_json) def init() do File.rename(@update_file, "#{@update_file}-prev") @@ -33,7 +33,9 @@ defmodule Instances do # Loop through all instances and check each for availability for service <- json do + IO.puts "======== " <> service.type result = Enum.filter(service.instances, fn(instance_url) -> + IO.puts " " <> instance_url request(instance_url <> service.test_url) == :good end) @@ -43,6 +45,8 @@ defmodule Instances do end def add_to_redis(service, instances) do + IO.puts " --------" + IO.inspect "OK: " <> instances # Remove previous list of instances Redix.command(:redix, [ "DEL", -- cgit v1.2.3