Skip to content
Snippets Groups Projects
Commit fb44e1f5 authored by Georges Racinet's avatar Georges Racinet
Browse files

workdir: auto-release if held by an invalid process id

The rationale is that if a working directory is being held by a process (existing
or not) that is not considered part of the HGitaly system service, it means that
the process was killed before it could release the working directory and the pid
is either not in use or has been reused for an unrelated process. The underlying
assumption is that only HGitaly is supposed to make such working directories.

This could be further expanded to the roster lock.

Had to put `is_current_service_process` in a separate top level module
instead of, e.g., `server.mono` to avoid import loop:
  server.mono imports services import workdir import server.mono

We need to use pytest-cov's `cleanup_on_signal` again. This time,
it's easier as the subprocess startup function is defined by the test itself.
parent 57761166
No related branches found
No related tags found
2 merge requests!151heptapod#743: making 0.36 the new stable,!145Pool of repository working directories
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment