prefect.utilities.processutils
¶
kill_on_interrupt
¶
Kill a process with the given pid
when a SIGNINT is received.
Source code in prefect/utilities/processutils.py
314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 |
|
open_process
async
¶
Like anyio.open_process
but with:
- Support for Windows command joining
- Termination of the process on exception during yield
- Forced cleanup of process resources during cancellation
Source code in prefect/utilities/processutils.py
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 |
|
run_process
async
¶
Like anyio.run_process
but with:
- Use of our
open_process
utility to ensure resources are cleaned up - Simple
stream_output
support to connect the subprocess to the parent stdout/err - Support for submission with
TaskGroup.start
marking as 'started' after the process has been created. When used, the PID is returned to the task status.
Source code in prefect/utilities/processutils.py
238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 |
|