Skip to content

Commit

Permalink
Add timeouts for engine deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcgr committed Aug 1, 2023
1 parent 7c97760 commit 858fb4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/testpool.jl
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function replace_engine(name::String)
end
# If the engine could not be deleted, notify and continue
try
delete_engine(get_context(), name)
delete_engine(get_context(), name, readtimeout=30)
catch
@warn("Could not delete engine: ", name)
name = TEST_ENGINE_POOL.generator(TEST_ENGINE_POOL.next_id)
Expand Down Expand Up @@ -174,7 +174,7 @@ function resize_test_engine_pool(size::Int64, generator::Option{Function}=nothin
Threads.@sync for engine in engines_to_delete
@info("Deleting engine", engine)
@async try
delete_engine(get_context(), engine)
delete_engine(get_context(), engine, readtimeout=30)
catch e
# The engine may not exist if it hasn't been used yet
# For other errors, we just report the error and delete what we can
Expand Down

0 comments on commit 858fb4f

Please sign in to comment.