Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add windows service functionality #344 #567

Merged
merged 37 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
e1d8bd6
Add windows service functionality #344
MolotovCherry Sep 2, 2024
ec20db2
Bug fixes and better formatted code
MolotovCherry Sep 2, 2024
c547af5
Add unpark() after kill() in stop(), and make sure shutdown condition…
MolotovCherry Sep 2, 2024
cbd1d85
Sort deps
MolotovCherry Sep 2, 2024
0efaaf8
Only logon/logoff should be important
MolotovCherry Sep 2, 2024
26dc46d
Separate logon/logoff into separate arms
MolotovCherry Sep 2, 2024
5c3ca8e
Stop service if process unexpectedly exits
MolotovCherry Sep 2, 2024
c3a961c
Fix clippy suggestions
MolotovCherry Sep 2, 2024
7402a7e
Added changelog entry
MolotovCherry Sep 2, 2024
bd7762d
Quote profile and config args
MolotovCherry Sep 2, 2024
a114986
Fix remaining len calculation for number of elems in vec
MolotovCherry Sep 2, 2024
aceef48
Now works with logoff/logon events
MolotovCherry Sep 3, 2024
b594ffa
Move service management to subcommands + add start and stop command
MolotovCherry Sep 3, 2024
ebdcc07
Service return error if failed to start service
MolotovCherry Sep 3, 2024
829e4b2
Simplify code by using channels instead of WaitForSingleObject in waiter
MolotovCherry Sep 4, 2024
0a31056
Unparking is no longer needed here thanks to channels
MolotovCherry Sep 4, 2024
e34c022
Sender does not need to be Arc
MolotovCherry Sep 4, 2024
b0f3743
Properly detach daemon on windows in `-d` mode
MolotovCherry Sep 4, 2024
ef464cd
Add -d fix to changelog
MolotovCherry Sep 4, 2024
7f234e9
Add more comments
MolotovCherry Sep 4, 2024
f0254f2
Bumped MSRV to 1.70
MolotovCherry Sep 9, 2024
716bfca
Add module docs, cleanup comments, and print specific daemon/subcomma…
MolotovCherry Sep 18, 2024
662a330
Slight comment sentence fixes
MolotovCherry Sep 18, 2024
bd9cc34
Fix a few more comments
MolotovCherry Sep 18, 2024
9d30ba5
Fixup comments + use lpApplicationName for simplification
MolotovCherry Sep 18, 2024
ac174ac
Add a little more to module level docs
MolotovCherry Sep 18, 2024
8c9bbe7
Add to help text
MolotovCherry Sep 18, 2024
9a8a347
Add more clarification in docs
MolotovCherry Sep 18, 2024
fd70869
Shorten calling cb()
MolotovCherry Sep 18, 2024
54d4bfd
Small finishing touches
MolotovCherry Sep 18, 2024
6d90c96
More fixups
MolotovCherry Sep 19, 2024
77233f3
Even more docs
MolotovCherry Sep 19, 2024
40508c9
Refactor signature of Spawner::start to be more robust to calling
MolotovCherry Sep 19, 2024
e6d0d50
Eagerly drop some things cause we can.
MolotovCherry Sep 19, 2024
05f180f
Add links to comment
MolotovCherry Sep 19, 2024
75d71a4
Merge remote-tracking branch 'upstream/main'
MolotovCherry Sep 21, 2024
5115c68
cargo update
MolotovCherry Sep 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ TLDR: The new task state representation is more verbose but significantly cleane
- **Breaking**: Remove the `--children` commandline flags, that have been deprecated and no longer serve any function since `v3.0.0`.
- Send log output to `stderr` instead of `stdout` [#562](https://github.com/Nukesor/pueue/issues/562).
- Change default log level from error to warning [#562](https://github.com/Nukesor/pueue/issues/562).
- Bumped MSRV to 1.70.

### Add

Expand All @@ -57,12 +58,14 @@ TLDR: The new task state representation is more verbose but significantly cleane
- Ability to set the Unix socket permissions through the new `unix_socket_permissions` configuration option. [#544](https://github.com/Nukesor/pueue/pull/544)
- Add `command` filter to `pueue status`. [#524](https://github.com/Nukesor/pueue/issues/524) [#560](https://github.com/Nukesor/pueue/pull/560)
- Allow `pueue status` to order tasks by `enqueue_at`. [#554](https://github.com/Nukesor/pueue/issues/554)
- Added Windows service on Windows to allow a true daemon experience. [#344](https://github.com/Nukesor/pueue/issues/344) [#567](https://github.com/Nukesor/pueue/pull/567)

### Fixed

- Fixed delay after sending process related commands from client. [#548](https://github.com/Nukesor/pueue/pull/548)
- Callback templating arguments were html escaped by accident. [#564](https://github.com/Nukesor/pueue/pull/564)
- Print incompatible version warning info as a log message instead of plain stdout input, which broke json outputs [#562](https://github.com/Nukesor/pueue/issues/562).
- Fixed `-d` daemon mode on Windows. [#344](https://github.com/Nukesor/pueue/issues/344)

## \[3.4.1\] - 2024-06-04

Expand Down
141 changes: 112 additions & 29 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ homepage = "https://github.com/nukesor/pueue"
repository = "https://github.com/nukesor/pueue"
license = "MIT"
edition = "2021"
rust-version = "1.67"
rust-version = "1.70"

[workspace.dependencies]
# Chrono version is hard pinned to a specific version.
Expand Down
2 changes: 2 additions & 0 deletions pueue/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ test-log = "0.2"
crossterm = { version = "0.27", default-features = false }
[target.'cfg(windows)'.dependencies]
crossterm = { version = "0.27", default-features = false, features = ["windows"] }
windows-service = "0.7.0"
windows = { version = "0.58.0", features = ["Win32_System_RemoteDesktop", "Win32_Security", "Win32_System_Threading", "Win32_System_SystemServices", "Win32_System_Environment"] }

# Test specific dev-dependencies
[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "netbsd"))'.dependencies]
Expand Down
Loading
Loading