diff --git a/web/lib/potato_mesh/config.rb b/web/lib/potato_mesh/config.rb index f4a1a30..f6ab209 100644 --- a/web/lib/potato_mesh/config.rb +++ b/web/lib/potato_mesh/config.rb @@ -133,8 +133,10 @@ module PotatoMesh ["potatomesh.net"].freeze end + # @return [Integer] the number of seconds between federation announcement broadcasts. + # Eight hours provides three updates per day without creating unnecessary chatter. def federation_announcement_interval - 24 * 60 * 60 + 8 * 60 * 60 end def site_name diff --git a/web/spec/config_spec.rb b/web/spec/config_spec.rb new file mode 100644 index 0000000..73b5620 --- /dev/null +++ b/web/spec/config_spec.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +require "spec_helper" + +RSpec.describe PotatoMesh::Config do + describe ".federation_announcement_interval" do + it "returns eight hours in seconds" do + expect(described_class.federation_announcement_interval).to eq(8 * 60 * 60) + end + end +end