new worker-task crate, move WorkerTaskContext from sys
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
f3021e686a
commit
847a57740b
@ -42,6 +42,7 @@ members = [
|
||||
"proxmox-time",
|
||||
"proxmox-time-api",
|
||||
"proxmox-uuid",
|
||||
"proxmox-worker-task",
|
||||
]
|
||||
exclude = [
|
||||
"build",
|
||||
@ -141,3 +142,4 @@ proxmox-sys = { version = "0.5.7", path = "proxmox-sys" }
|
||||
proxmox-tfa = { version = "5.0.0", path = "proxmox-tfa" }
|
||||
proxmox-time = { version = "2.0.0", path = "proxmox-time" }
|
||||
proxmox-uuid = { version = "1.0.1", path = "proxmox-uuid" }
|
||||
proxmox-worker-task = { version = "1.0.0", path = "proxmox-worker-task" }
|
||||
|
@ -46,6 +46,7 @@ proxmox-router.workspace = true
|
||||
proxmox-schema = { workspace = true, features = [ "api-macro", "upid-api-impl" ] }
|
||||
proxmox-sys = { workspace = true, features = [ "logrotate", "timer" ] }
|
||||
proxmox-time.workspace = true
|
||||
proxmox-worker-task.workspace = true
|
||||
|
||||
[features]
|
||||
default = []
|
||||
|
@ -24,9 +24,8 @@ use proxmox_log::{FileLogOptions, FileLogger, LOGGER, WARN_COUNTER};
|
||||
use proxmox_schema::upid::UPID;
|
||||
use proxmox_sys::fs::{atomic_open_or_create_file, create_path, replace_file, CreateOptions};
|
||||
use proxmox_sys::linux::procfs;
|
||||
|
||||
use proxmox_sys::logrotate::{LogRotate, LogRotateFiles};
|
||||
use proxmox_sys::WorkerTaskContext;
|
||||
use proxmox_worker_task::WorkerTaskContext;
|
||||
|
||||
use crate::CommandSocket;
|
||||
|
||||
|
@ -18,9 +18,6 @@ pub mod mmap;
|
||||
pub mod process_locker;
|
||||
pub mod systemd;
|
||||
|
||||
mod worker_task_context;
|
||||
pub use worker_task_context::*;
|
||||
|
||||
/// Returns the hosts node name (UTS node name)
|
||||
pub fn nodename() -> &'static str {
|
||||
lazy_static::lazy_static! {
|
||||
|
13
proxmox-worker-task/Cargo.toml
Normal file
13
proxmox-worker-task/Cargo.toml
Normal file
@ -0,0 +1,13 @@
|
||||
[package]
|
||||
name = "proxmox-worker-task"
|
||||
version = "1.0.0"
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
description = "Worker task functionality"
|
||||
|
||||
exclude.workspace = true
|
||||
|
||||
[dependencies]
|
||||
anyhow.workspace = true
|
5
proxmox-worker-task/debian/changelog
Normal file
5
proxmox-worker-task/debian/changelog
Normal file
@ -0,0 +1,5 @@
|
||||
rust-proxmox-worker-task (0.1.0-1) bookworm; urgency=medium
|
||||
|
||||
* Initial release
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 11 Jul 2024 13:03:45 +0200
|
0
proxmox-worker-task/debian/control
Normal file
0
proxmox-worker-task/debian/control
Normal file
18
proxmox-worker-task/debian/copyright
Normal file
18
proxmox-worker-task/debian/copyright
Normal file
@ -0,0 +1,18 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
|
||||
Files:
|
||||
*
|
||||
Copyright: 2019 - 2024 Proxmox Server Solutions GmbH <support@proxmox.com>
|
||||
License: AGPL-3.0-or-later
|
||||
This program is free software: you can redistribute it and/or modify it under
|
||||
the terms of the GNU Affero General Public License as published by the Free
|
||||
Software Foundation, either version 3 of the License, or (at your option) any
|
||||
later version.
|
||||
.
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
details.
|
||||
.
|
||||
You should have received a copy of the GNU Affero General Public License along
|
||||
with this program. If not, see <https://www.gnu.org/licenses/>.
|
7
proxmox-worker-task/debian/debcargo.toml
Normal file
7
proxmox-worker-task/debian/debcargo.toml
Normal file
@ -0,0 +1,7 @@
|
||||
overlay = "."
|
||||
crate_src_path = ".."
|
||||
maintainer = "Proxmox Support Team <support@proxmox.com>"
|
||||
|
||||
[source]
|
||||
vcs_git = "git://git.proxmox.com/git/proxmox.git"
|
||||
vcs_browser = "https://git.proxmox.com/?p=proxmox.git"
|
Loading…
Reference in New Issue
Block a user