mirror of
https://github.com/benbusby/farside.git
synced 2025-05-04 01:20:02 +00:00
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.
This commit is contained in:
parent
06bb8403dd
commit
8042dcad0c
8 changed files with 45 additions and 30 deletions
10
update.exs
10
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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue