Skip to content

Commit b6dac24

Browse files
Merge pull request #9416 from mhashizume/maint/main/revert-splay
Revert "Merge pull request #9345 from mhashizume/PUP-11728/main/splay"
2 parents 637ef2a + a1a84cb commit b6dac24

File tree

3 files changed

+0
-22
lines changed

3 files changed

+0
-22
lines changed

lib/puppet/daemon.rb

-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ def run_event_loop
165165
reparse_run = Puppet::Scheduler.create_job(Puppet[:filetimeout]) do
166166
Puppet.settings.reparse_config_files
167167
agent_run.run_interval = Puppet[:runinterval]
168-
agent_run.splay_limit = Puppet[:splaylimit] if Puppet[:splay]
169168
if Puppet[:filetimeout] == 0
170169
reparse_run.disable
171170
else

lib/puppet/scheduler/splay_job.rb

-9
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,6 @@ def ready?(time)
2525
end
2626
end
2727

28-
# Recalculates splay.
29-
#
30-
# @param splay_limit [Integer] the maximum time (in seconds) to delay before an agent's first run.
31-
# @return @splay [Integer] a random integer less than or equal to the splay limit that represents the seconds to
32-
# delay before next agent run.
33-
def splay_limit=(splay_limit)
34-
@splay = calculate_splay(splay_limit)
35-
end
36-
3728
private
3829

3930
def calculate_splay(limit)

spec/unit/daemon_spec.rb

-12
Original file line numberDiff line numberDiff line change
@@ -79,18 +79,6 @@ def run_loop(jobs)
7979
daemon.start
8080
expect(scheduler.jobs[0]).not_to be_enabled
8181
end
82-
83-
it "recalculates splay if splaylimit changes" do
84-
# Set file timeout so the daemon reparses
85-
Puppet[:filetimeout] = 1
86-
Puppet[:splay] = true
87-
allow(agent).to receive(:run)
88-
daemon.start
89-
first_splay = scheduler.jobs[1].splay
90-
allow(Kernel).to receive(:rand).and_return(1738)
91-
scheduler.jobs[0].run(Time.now)
92-
expect(scheduler.jobs[1].splay).to_not eq(first_splay)
93-
end
9482
end
9583

9684
describe "when stopping" do

0 commit comments

Comments
 (0)