Skip to content

Commit 5c8a090

Browse files
committed
fix: remove reset servers logic
1 parent 7be59da commit 5c8a090

File tree

1 file changed

+1
-38
lines changed

1 file changed

+1
-38
lines changed

doc/source/conf.py

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
)
1111
import numpy as np
1212
import pyvista
13-
import sphinx
1413

1514
from ansys.dpf.core import __version__, server, server_factory
1615
from ansys.dpf.core.examples import get_example_required_minimum_dpf_version
@@ -374,40 +373,4 @@ def reset_servers(gallery_conf, fname, when):
374373
# epub_uid = ''
375374

376375
# A list of files that should not be packed into the epub file.
377-
epub_exclude_files = ["search.html"]
378-
379-
380-
def close_live_servers_and_processes(app: sphinx.application.Sphinx) -> None:
381-
# Adapted from reset_servers() function, so this can be called after
382-
# sphinx gallery finishes execution
383-
import gc
384-
385-
import psutil
386-
387-
from ansys.dpf.core import server
388-
389-
gc.collect()
390-
server.shutdown_all_session_servers()
391-
392-
proc_name = "Ans.Dpf.Grpc"
393-
nb_procs = 0
394-
for proc in psutil.process_iter():
395-
try:
396-
# check whether the process name matches
397-
if proc_name in proc.name():
398-
proc.kill()
399-
nb_procs += 1
400-
except psutil.NoSuchProcess:
401-
pass
402-
403-
def setup(app: sphinx.application.Sphinx) -> None:
404-
"""
405-
Run hook function(s) during the documentation build.
406-
407-
Parameters
408-
----------
409-
app : sphinx.application.Sphinx
410-
Sphinx application instance containing the all the doc build configuration.
411-
"""
412-
413-
app.connect("builder-inited", close_live_servers_and_processes)
376+
epub_exclude_files = ["search.html"]

0 commit comments

Comments
 (0)