Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove unused code #93

Merged
merged 1 commit into from
Aug 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions lib/outboxer/publisher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,29 +34,6 @@ def stop
@publishing = false
end

def create_delete_published_messages_thread(
cleanup_interval: 60, retention_period: 3600,
logger: Logger.new($stdout, level: Logger::INFO), kernel: Kernel, time: Time
)
Thread.new do
loop do
begin
Messages.delete_all(
status: Models::Message::Status::PUBLISHED,
batch_size: 100,
older_than: time.now.utc - retention_period)

kernel.sleep(cleanup_interval)
rescue StandardError => exception
logger.error "#{exception.class}: #{exception.message}"
exception.backtrace.each { |frame| logger.error frame }

kernel.sleep(cleanup_interval)
end
end
end
end

def create_publisher_thread(queue:, logger:, &block)
Thread.new do
loop do
Expand Down
Loading