Skip to content

Commit

Permalink
Fix setting a robust PID when running in a container
Browse files Browse the repository at this point in the history
  • Loading branch information
senesis committed Jul 1, 2024
1 parent 60a098b commit 96d26e1
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions env/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,16 @@ def my_which(soft):
"nco (ncatted) not available, can not stamp netcdf files")
do_stamping = False
try:
convert_software = my_which("convert")
convert_software = my_which("magick")
clogger.info("convert found -> " + convert_software)
except:
convert_software = None
clogger.warning("convert not available, can not stamp png files")
do_stamping = False
try:
convert_software = my_which("convert")
clogger.info("convert found -> " + convert_software)
except:
convert_software = None
clogger.warning("convert not available, can not stamp png files")
do_stamping = False
try:
pdftk_software = my_which("pdftk")
clogger.info("pdftk found -> " + pdftk_software)
Expand Down Expand Up @@ -247,4 +251,4 @@ def my_which(soft):
# We are running there in a container, so concurrent instances
# of CliMAF may have the same process ID, while they have distinct
# values of environement variable SCRIPTID
pid = os.getenv("SCRIPT_PID", robust_pid)
robust_pid = os.getenv("SCRIPT_PID", robust_pid)

0 comments on commit 96d26e1

Please sign in to comment.