소스 검색

Merge pull request #17652 from gavindsouza/bench-build-no_retry

fix: Don't retry asset caching in CI or developer_mode
version-14
gavin 2 년 전
committed by GitHub
부모
커밋
9c84a7cfd9
No known key found for this signature in database GPG 키 ID: 4AEE18F83AFDEB23
1개의 변경된 파일9개의 추가작업 그리고 4개의 파일을 삭제
  1. +9
    -4
      esbuild/utils.js

+ 9
- 4
esbuild/utils.js 파일 보기

@@ -112,16 +112,21 @@ function log(...args) {

function get_redis_subscriber(kind) {
// get redis subscriber that aborts after 10 connection attempts
let { get_redis_subscriber: get_redis } = require("../node_utils");
return get_redis(kind, {
retry_strategy: function(options) {
let retry_strategy;
let { get_redis_subscriber: get_redis, get_conf } = require("../node_utils");

if (process.env.CI == 1 || get_conf().developer_mode == 1) {
retry_strategy = () => { }
} else {
retry_strategy = function (options) {
// abort after 10 connection attempts
if (options.attempt > 10) {
return undefined;
}
return Math.min(options.attempt * 100, 2000);
}
});
}
return get_redis(kind, { retry_strategy });
}

module.exports = {


불러오는 중...
취소
저장