Skip to content

Commit

Permalink
Revert default .poll_interval to 3 seconds
Browse files Browse the repository at this point in the history
This reverts commit 994ea02.
  • Loading branch information
akadusei committed Dec 1, 2023
1 parent cc71be0 commit 323cd18
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Upgrade `jgaskins/redis` shard to v0.8
- Make `Mel::Task#run` method only available to workers
- Remove hyphens from default task IDs (UUIDs)
- Revert default `.poll_interval` to 3 seconds

### Fixed
- Avoid a single task running multiple times if using multiple workers
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ This makes *Redis* the *source of truth* for schedules, allowing to easily scale
Mel.configure do |settings|
settings.batch_size = -100
settings.poll_interval = 15.seconds
settings.poll_interval = 3.seconds
settings.worker_id = ENV["WORKER_ID"].to_i
end
Expand Down
2 changes: 1 addition & 1 deletion src/worker.cr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ require "./worker/**"
module Mel
private module Settings
class_property batch_size : Int32 = -100
class_property poll_interval : Time::Span = 15.seconds
class_property poll_interval : Time::Span = 3.seconds

class_setter worker_id : Int32?

Expand Down

0 comments on commit 323cd18

Please sign in to comment.