1
0
مراية لـ https://github.com/postalserver/postal.git تم المزامنة 2025-12-01 05:43:04 +00:00

add script to set process concurrency on start/restart/run from config

هذا الالتزام موجود في:
Adam Cooke
2017-04-26 20:48:04 +01:00
الأصل 8da33ba58e
التزام ff645a6677
4 ملفات معدلة مع 24 إضافات و0 حذوفات

عرض الملف

@@ -0,0 +1,16 @@
#!/usr/bin/env ruby
require File.expand_path('../../lib/postal/config', __FILE__)
worker_quantity = Postal.config.workers&.quantity || 1
hash = {
'processes' => {
'worker' => {
'quantity' => worker_quantity
},
'fast' => {
'quantity' => Postal.config.fast_server ? 1 : 0
}
}
}.to_yaml
File.open(Postal.app_root.join('Procfile.local'), 'w') { |f| f.write(hash + "\n")}