feat: buffer
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#!/bin/bash
|
||||
ulimit -n 97816
|
||||
|
||||
# Load Redis password from .env file
|
||||
export REDIS_PASSWORD=$(grep -m 1 'REDIS_PASSWORD' .env | cut -d '=' -f2)
|
||||
@@ -42,9 +43,18 @@ else
|
||||
log_warning "No keys matched the pattern '*_lock'."
|
||||
fi
|
||||
|
||||
# Clear RabbitMQ queue
|
||||
log_info "Purging RabbitMQ queue 'taskiq' in vhost 'stocks_vhost'..."
|
||||
rabbitmqctl purge_queue -p stocks_vhost taskiq
|
||||
if [ $? -eq 0 ]; then
|
||||
log_info "RabbitMQ queue purged successfully."
|
||||
else
|
||||
log_error "Failed to purge RabbitMQ queue. Please check your RabbitMQ setup."
|
||||
fi
|
||||
|
||||
# Start the Taskiq worker
|
||||
log_info "Starting Taskiq worker..."
|
||||
taskiq worker background:taskiq_broker background.tasks
|
||||
taskiq worker background:taskiq_broker background.tasks --max-async-task 5000 --max-threadpool-threads 8 --max-prefetch 10000
|
||||
|
||||
# Log when the Taskiq worker stops
|
||||
log_info "Taskiq worker stopped"
|
||||
log_info "Taskiq worker stopped"
|
||||
Reference in New Issue
Block a user