@blocklet/crawler 2.1.237 → 2.1.239
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -356,6 +356,10 @@ async function detectBestRedisUrl() {
|
|
|
356
356
|
const possibleUrls = [
|
|
357
357
|
// environment variable priority
|
|
358
358
|
process.env.REDIS_URL,
|
|
359
|
+
// by blocklet host
|
|
360
|
+
process.env.BLOCKLET_HOST ? `redis://${process.env.BLOCKLET_HOST}:6379` : null,
|
|
361
|
+
// default gateway
|
|
362
|
+
defaultGateway ? `redis://${defaultGateway}:6379` : null,
|
|
359
363
|
// by web component endpoint
|
|
360
364
|
(() => {
|
|
361
365
|
try {
|
|
@@ -369,8 +373,6 @@ async function detectBestRedisUrl() {
|
|
|
369
373
|
}
|
|
370
374
|
return null;
|
|
371
375
|
})(),
|
|
372
|
-
// default gateway
|
|
373
|
-
defaultGateway ? `redis://${defaultGateway}:6379` : null,
|
|
374
376
|
// common Docker gateway
|
|
375
377
|
"redis://192.168.0.1:6379",
|
|
376
378
|
// Docker special DNS
|
|
@@ -379,6 +379,10 @@ async function detectBestRedisUrl() {
|
|
|
379
379
|
const possibleUrls = [
|
|
380
380
|
// environment variable priority
|
|
381
381
|
process.env.REDIS_URL,
|
|
382
|
+
// by blocklet host
|
|
383
|
+
process.env.BLOCKLET_HOST ? `redis://${process.env.BLOCKLET_HOST}:6379` : null,
|
|
384
|
+
// default gateway
|
|
385
|
+
defaultGateway ? `redis://${defaultGateway}:6379` : null,
|
|
382
386
|
// by web component endpoint
|
|
383
387
|
(() => {
|
|
384
388
|
try {
|
|
@@ -392,8 +396,6 @@ async function detectBestRedisUrl() {
|
|
|
392
396
|
}
|
|
393
397
|
return null;
|
|
394
398
|
})(),
|
|
395
|
-
// default gateway
|
|
396
|
-
defaultGateway ? `redis://${defaultGateway}:6379` : null,
|
|
397
399
|
// common Docker gateway
|
|
398
400
|
"redis://192.168.0.1:6379",
|
|
399
401
|
// Docker special DNS
|