Skip to content

Commit bda4da0

Browse files
reduce stale_age values given 25x in Pidfile
1 parent 42a025c commit bda4da0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Registry/Registry.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ function download_registries(io::IO, regs::Vector{RegistrySpec}, depot::String=d
164164
populate_known_registries_with_urls!(regs)
165165
regdir = joinpath(depot, "registries")
166166
isdir(regdir) || mkpath(regdir)
167-
Pidfile.mkpidlock(joinpath(regdir, ".pid"), stale_age = 60*60) do
167+
Pidfile.mkpidlock(joinpath(regdir, ".pid"), stale_age = 10) do
168168
# only allow one julia process to download and install registries at a time
169169
registry_urls = pkg_server_registry_urls()
170170
for reg in regs
@@ -395,7 +395,7 @@ function update(regs::Vector{RegistrySpec} = RegistrySpec[]; io::IO=stderr_f(),
395395
for reg in unique(r -> r.uuid, find_installed_registries(io, regs); seen=Set{UUID}())
396396
let reg=reg, errors=errors
397397
regpath = pathrepr(reg.path)
398-
Pidfile.mkpidlock(joinpath(dirname(dirname(reg.path)), ".$(reg.name).pid"), stale_age = 60*60) do
398+
Pidfile.mkpidlock(joinpath(dirname(dirname(reg.path)), ".$(reg.name).pid"), stale_age = 10) do
399399
# only allow one julia process to update a registry at a time
400400
let regpath=regpath
401401
if reg.tree_info !== nothing

src/Types.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ function write_env_usage(source_file::AbstractString, usage_filepath::AbstractSt
482482
timestamp = now()
483483

484484
## Atomically write usage file using process id locking
485-
Pidfile.mkpidlock(usage_file * ".pid", stale_age = 30) do
485+
Pidfile.mkpidlock(usage_file * ".pid", stale_age = 3) do
486486
usage = if isfile(usage_file)
487487
TOML.parsefile(usage_file)
488488
else

0 commit comments

Comments
 (0)