update clear cache
All checks were successful
Deploy to Production / deploy (push) Successful in 20s
All checks were successful
Deploy to Production / deploy (push) Successful in 20s
This commit is contained in:
@@ -9,16 +9,12 @@ module.exports = {
|
||||
{
|
||||
name: 'sena-api',
|
||||
script: './server.js',
|
||||
instances: 2, // Chạy 2 instances để tận dụng CPU
|
||||
instances: 1, // Chạy 1 instance để tận dụng CPU
|
||||
exec_mode: 'cluster',
|
||||
env: {
|
||||
NODE_ENV: 'production',
|
||||
PORT: 10001,
|
||||
},
|
||||
env_development: {
|
||||
NODE_ENV: 'development',
|
||||
PORT: 10001,
|
||||
},
|
||||
error_file: './logs/api-error.log',
|
||||
out_file: './logs/api-out.log',
|
||||
log_date_format: 'YYYY-MM-DD HH:mm:ss',
|
||||
@@ -28,75 +24,6 @@ module.exports = {
|
||||
watch: false,
|
||||
max_restarts: 10,
|
||||
min_uptime: '10s',
|
||||
},
|
||||
|
||||
// Database Write Worker
|
||||
{
|
||||
name: 'worker-db-write',
|
||||
script: './workers/databaseWriteWorker.js',
|
||||
instances: 1,
|
||||
exec_mode: 'fork',
|
||||
env: {
|
||||
NODE_ENV: 'production',
|
||||
},
|
||||
env_development: {
|
||||
NODE_ENV: 'development',
|
||||
},
|
||||
error_file: './logs/worker-db-write-error.log',
|
||||
out_file: './logs/worker-db-write-out.log',
|
||||
log_date_format: 'YYYY-MM-DD HH:mm:ss',
|
||||
merge_logs: true,
|
||||
max_memory_restart: '512M',
|
||||
autorestart: true,
|
||||
watch: false,
|
||||
max_restarts: 10,
|
||||
min_uptime: '10s',
|
||||
},
|
||||
|
||||
// Lesson Data Fill Worker
|
||||
{
|
||||
name: 'worker-lesson-fill',
|
||||
script: './workers/lessonDataFillWorker.js',
|
||||
instances: 1,
|
||||
exec_mode: 'fork',
|
||||
env: {
|
||||
NODE_ENV: 'production',
|
||||
},
|
||||
env_development: {
|
||||
NODE_ENV: 'development',
|
||||
},
|
||||
error_file: './logs/worker-lesson-fill-error.log',
|
||||
out_file: './logs/worker-lesson-fill-out.log',
|
||||
log_date_format: 'YYYY-MM-DD HH:mm:ss',
|
||||
merge_logs: true,
|
||||
max_memory_restart: '512M',
|
||||
autorestart: true,
|
||||
watch: false,
|
||||
max_restarts: 10,
|
||||
min_uptime: '10s',
|
||||
},
|
||||
|
||||
// Process Data Worker
|
||||
{
|
||||
name: 'worker-process-data',
|
||||
script: './workers/processDataWorker.js',
|
||||
instances: 2, // Chạy 2 instances để xử lý song song
|
||||
exec_mode: 'fork',
|
||||
env: {
|
||||
NODE_ENV: 'production',
|
||||
},
|
||||
env_development: {
|
||||
NODE_ENV: 'development',
|
||||
},
|
||||
error_file: './logs/worker-process-data-error.log',
|
||||
out_file: './logs/worker-process-data-out.log',
|
||||
log_date_format: 'YYYY-MM-DD HH:mm:ss',
|
||||
merge_logs: true,
|
||||
max_memory_restart: '512M',
|
||||
autorestart: true,
|
||||
watch: false,
|
||||
max_restarts: 10,
|
||||
min_uptime: '10s',
|
||||
},
|
||||
}
|
||||
],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user