Spaces:
Sleeping
Sleeping
Upload 11 files
Browse filesFiles changed (2)
150 unmodified lines151152153154155156157158150 unmodified linesself.wfile.write(body)def log_message(self, format, *args):"""Cleaner log format."""sys.stderr.write(f"[gateway] {self.address_string()} {format % args}\n")def wait_for_clickhouse(timeout=60):150 unmodified lines151152153154155156157158159160161150 unmodified linesself.wfile.write(body)def log_message(self, format, *args):"""Cleaner log format. Ignores HF container ping logs for cleanliness."""msg = format % argsif "?logs=container" in msg:returnsys.stderr.write(f"[gateway] {self.address_string()} {msg}\n")def wait_for_clickhouse(timeout=60):
106 unmodified lines107108109110111112106 unmodified linescmd = ["git", "clone", "--depth", clone_depth] + branch_flag + auth_flag + [repo_url, target_dir]output, success = run_subprocess(cmd)git_status = "cloned" if success else f"error_clone: {output}"else:# We want to fetch and hard resetcmd_fetch = ["git"] + auth_flag + ["fetch", "--depth", "1", "origin"]106 unmodified lines107108109110111112113114115116117118119106 unmodified linescmd = ["git", "clone", "--depth", clone_depth] + branch_flag + auth_flag + [repo_url, target_dir]output, success = run_subprocess(cmd)git_status = "cloned" if success else f"error_clone: {output}"# Retrieve real files for Git LFS pointers natively used by Hugging Face Datasetsif success:cmd_lfs = ["git", "lfs", "pull"]out_lfs, suc_lfs = run_subprocess(cmd_lfs, cwd=target_dir)if not suc_lfs:git_status = f"error_lfs_pull: {out_lfs}"else:# We want to fetch and hard resetcmd_fetch = ["git"] + auth_flag + ["fetch", "--depth", "1", "origin"]
gateway.py+5-2
refresh_sources.py+7