orztv
commited on
Commit
·
ca1b28f
1
Parent(s):
0069402
update
Browse files
run.sh
CHANGED
@@ -38,8 +38,18 @@ start_redis() {
|
|
38 |
fi
|
39 |
}
|
40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
wait_for_postgres
|
42 |
start_redis
|
|
|
43 |
|
44 |
# 设置 N8N 环境变量
|
45 |
export N8N_ENCRYPTION_KEY="${N8N_ENCRYPTION_KEY:-n8n8n8n}"
|
@@ -78,5 +88,5 @@ echo "QUEUE_BULL_REDIS_HOST: ${QUEUE_BULL_REDIS_HOST}"
|
|
78 |
echo "QUEUE_BULL_REDIS_PORT: ${QUEUE_BULL_REDIS_PORT}"
|
79 |
echo "EXECUTIONS_MODE: ${EXECUTIONS_MODE}"
|
80 |
|
81 |
-
#
|
82 |
-
exec n8n start
|
|
|
38 |
fi
|
39 |
}
|
40 |
|
41 |
+
# 在 start_redis() 函数后添加检查函数
|
42 |
+
check_redis_queue() {
|
43 |
+
echo "检查 Redis 队列状态..."
|
44 |
+
redis-cli info | grep connected_clients
|
45 |
+
redis-cli keys "${N8N_QUEUE_BULL_REDIS_PREFIX}*"
|
46 |
+
echo "Redis 队列键值列表:"
|
47 |
+
redis-cli keys "*" | grep "bull"
|
48 |
+
}
|
49 |
+
|
50 |
wait_for_postgres
|
51 |
start_redis
|
52 |
+
check_redis_queue
|
53 |
|
54 |
# 设置 N8N 环境变量
|
55 |
export N8N_ENCRYPTION_KEY="${N8N_ENCRYPTION_KEY:-n8n8n8n}"
|
|
|
88 |
echo "QUEUE_BULL_REDIS_PORT: ${QUEUE_BULL_REDIS_PORT}"
|
89 |
echo "EXECUTIONS_MODE: ${EXECUTIONS_MODE}"
|
90 |
|
91 |
+
# 将输出重定向到日志文件
|
92 |
+
exec n8n start 2>&1 | tee /home/pn/.n8n/n8n.log
|