MCPcopy Index your code
hub / github.com/WebODM/WebODM / webpack_watch_process_count

Function webpack_watch_process_count

app/plugins/functions.py:144–157  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

142 logger.warn("webpack-cli is not installed, plugin will not work")
143
144def webpack_watch_process_count():
145 count = 0
146 try:
147 pids = [pid for pid in os.listdir('/proc') if pid.isdigit()]
148 for pid in pids:
149 try:
150 if "/usr/bin/webpack-cli" in open(os.path.join('/proc', pid, 'cmdline'), 'r').read().split('\0'):
151 count += 1
152 except IOError: # proc has already terminated
153 continue
154 except:
155 logger.warning("webpack_watch_process_count is not supported on this platform.")
156
157 return count
158
159
160def register_plugins():

Callers 1

build_pluginsFunction · 0.85

Calls 1

readMethod · 0.45

Tested by

no test coverage detected