Skip to content

Commit

Permalink
update eye config
Browse files Browse the repository at this point in the history
Update eye config for more dynamic memory allocation for shards
  • Loading branch information
Humblemonk committed Sep 2, 2024
1 parent e9e0b3c commit 78d2a15
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/dice_maiden.eye
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ cwd = File.expand_path(File.join(File.dirname(__FILE__), %w[../]))
Dotenv.load("#{cwd}/.env")

total_shards = ENV['SHARD'].to_i
shard_mem = ENV['MEM'].to_i

Eye.config do
logger "/tmp/eye.log"
Expand All @@ -16,7 +17,7 @@ Eye.app 'dice_maiden' do
working_dir cwd
env 'BUNDLE_GEMFILE' => "Gemfile"
trigger :flapping, times: 10, within: 1.minute, retry_in: 10.minutes
check :memory, :below => 512.megabytes, :every => 60.seconds, :times => 3
check :memory, :below => shard_mem.megabytes, :every => 60.seconds, :times => 3
check :cpu, below: 100, every: 60.seconds, times: 3

group 'shards' do
Expand Down

0 comments on commit 78d2a15

Please sign in to comment.