Skip to content

Commit

Permalink
Ensure pid directory exists (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
kleinschmidt committed Aug 6, 2024
1 parent c43646a commit 973acac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "K8sDeputy"
uuid = "2481ae95-212f-4650-bb21-d53ea3caf09f"
authors = ["Beacon Biosignals, Inc"]
version = "0.1.2"
version = "0.1.3"

[deps]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Expand Down
6 changes: 5 additions & 1 deletion src/graceful_termination.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ end
# Following the Linux convention for pid files:
# https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s15.html
entrypoint_pid_file() = joinpath(_deputy_ipc_dir(), "julia-entrypoint.pid")
set_entrypoint_pid(pid::Integer) = write(entrypoint_pid_file(), string(pid) * "\n")
function set_entrypoint_pid(pid::Integer)
file = entrypoint_pid_file()
mkpath(dirname(file))
return write(file, string(pid) * "\n")
end

function entrypoint_pid()
pid_file = entrypoint_pid_file()
Expand Down

2 comments on commit 973acac

@omus
Copy link
Member

@omus omus commented on 973acac Aug 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/112519

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.3 -m "<description of version>" 973acace81b0efb8faf233a6cf0952ecd8958fe3
git push origin v0.1.3

Please sign in to comment.