Skip to content

Commit 283ccca

Browse files
author
afabiani
committed
- Version 2.14.x
1 parent bfa507b commit 283ccca

File tree

15 files changed

+66
-218
lines changed

15 files changed

+66
-218
lines changed

.gitignore

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
*.py[cod]
22
*.suo
33

4+
/build/
45
RemoteWPS1.pyproj
56
RemoteWPS1.sln
6-
Include
7-
Lib/
8-
Scripts/
7+
/Include
8+
/Lib/
9+
/Scripts/
10+
11+
/RemoteWPS.pyproj
12+
/RemoteWPS.sln
13+
/.vs/config/applicationhost.config
14+
/dist/

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
setup(
3535
name = "wps-remote",
36-
version = "2.12.0",
36+
version = "2.14.0",
3737
author = "GeoServer Developers",
3838
author_email = "geoserver-devel@lists.sourceforge.net",
3939
description = "A library that allows users to publish their executables as GeoServer WPS Processes through the XMPP protocol",

src/wps_remote.egg-info/PKG-INFO

Lines changed: 0 additions & 105 deletions
This file was deleted.

src/wps_remote.egg-info/SOURCES.txt

Lines changed: 0 additions & 52 deletions
This file was deleted.

src/wps_remote.egg-info/dependency_links.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/wps_remote.egg-info/requires.txt

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/wps_remote.egg-info/top_level.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/wpsremote/processbot.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,16 @@ def __init__(self, remote_config_filepath, service_config_filepath, execute_mess
7575

7676
self._executable_path = serviceConfig.get("DEFAULT", "executable_path")
7777
self._executable_cmd = serviceConfig.get("DEFAULT", "executable_cmd")
78+
if not os.path.isabs(self._executable_path):
79+
full_executable_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), self._executable_path)
80+
self._executable_cmd = self._executable_cmd.replace(self._executable_path, full_executable_path)
81+
self._executable_path = full_executable_path
7882

7983
self._stdout_parser = serviceConfig.get_list("Logging", "stdout_parser")
8084
self._stdout_action = serviceConfig.get_list("Logging", "stdout_action")
8185
self._output_dir = serviceConfig.get_path("DEFAULT", "output_dir")
86+
if not os.path.isabs(self._output_dir):
87+
self._output_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), self._output_dir)
8288
self._max_running_time = datetime.timedelta(seconds = serviceConfig.getint("DEFAULT", "max_running_time_seconds"))
8389

8490
#create the concrete uploader object

src/wpsremote/resource_cleaner.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import logging
2121
import traceback
2222

23+
2324
class Resource(object):
2425
"""
2526
Identify a process generated by a remote WPS call.

src/wpsremote/resource_monitor.py

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -35,27 +35,31 @@ def __init__(self, load_average_scan_minutes):
3535
ResourceMonitor.lock.release()
3636

3737
def proc_is_running(self, proc_names):
38-
for proc in psutil.process_iter():
39-
40-
process = psutil.Process(proc.pid).as_dict() # Get the process info using PID
41-
42-
pid = str(process["pid"])
43-
ppid = str(process["ppid"])
44-
status = process["status"]
45-
46-
cpu_percent = process["cpu_percent"]
47-
mem_percent = process["memory_percent"]
48-
49-
rss = str(process["memory_info"].rss)
50-
vms = str(process["memory_info"].vms)
51-
username = process["username"]
52-
name = process["name"] # Here is the process name
53-
path = process["cwd"]
54-
55-
for proc_name in proc_names:
56-
if status.lower() == "running" and proc_name in name.lower():
57-
return True
58-
38+
for proc in psutil.process_iter():
39+
try:
40+
process = psutil.Process(proc.pid).as_dict() # Get the process info using PID
41+
42+
pid = str(process["pid"])
43+
ppid = str(process["ppid"])
44+
status = process["status"]
45+
46+
cpu_percent = process["cpu_percent"]
47+
mem_percent = process["memory_percent"]
48+
49+
rss = str(process["memory_info"].rss)
50+
vms = str(process["memory_info"].vms)
51+
username = process["username"]
52+
name = process["name"] # Here is the process name
53+
path = process["cwd"]
54+
55+
for proc_name in proc_names:
56+
if status.lower() == "running" and proc_name in name.lower():
57+
return True
58+
except:
59+
import traceback
60+
tb = traceback.format_exc()
61+
# print(tb)
62+
continue
5963
return False
6064

6165
def run(self):

0 commit comments

Comments
 (0)