1
0
مراية لـ https://github.com/postalserver/postal.git تم المزامنة 2025-11-30 21:32:30 +00:00

feat(worker): allow number of threads to be configured

This allows for more threads to be run. Care needs to be taken to ensure that database connection pool size is appropriate for this.
هذا الالتزام موجود في:
Adam Cooke
2024-03-17 18:41:26 +00:00
الأصل ee8d829a85
التزام 7e2acccd1e
4 ملفات معدلة مع 11 إضافات و1 حذوفات

عرض الملف

@@ -45,7 +45,9 @@ module Worker
].freeze
# @param [Integer] thread_count The number of worker threads to run in this process
def initialize(thread_count: 2, work_sleep_time: 5, task_sleep_time: 60)
def initialize(thread_count: Postal::Config.worker.threads,
work_sleep_time: 5,
task_sleep_time: 60)
@thread_count = thread_count
@exit_pipe_read, @exit_pipe_write = IO.pipe
@work_sleep_time = work_sleep_time