Pueue是一種命令行任務管理工具,用於順序和並行執行長期運行的任務。
簡而言之,這是一種工具,可以使shell命令的aq ueue aq ueue 。最重要的是,有很多方便的功能和抽象。
由於Pueue不綁定到任何終端,因此您可以從同一機器上的任何終端控制任務。即使您不再有任何活動的SSH會話,隊列也將連續處理。
Pueue被認為是特徵算法嗎?所有計劃的功能都已添加,只有較小的改進,錯誤修復和定期維護工作才能合併。
pueued守護程序在後台運行。無需登錄。log和status 。wait子命令等待特定任務,組(或所有內容)完成。Pueue並非被設計為重型可編程(腳本)任務調度程序/執行程序。
pueue的重點在於人類的互動,即,它應該由真實的人在某種操作系統上使用。請參閱“設計目標”部分
因此, pueue和實施和pueued的功能集以及它們的實現和架構一直很簡單!即使可以在某種程度上進行腳本腳本,但它並沒有為此構建,也沒有官方的支持!
絕對需要具有高級API訪問和調度選項的複雜任務調度程序/執行程序,但這是另一個項目的工作,因為這不是Pueue的構建。
有幾種安裝Pueue的方法。
安裝Pueue的首選方法是使用系統的軟件包管理器。這通常會自動部署服務文件和完成。
Pueue已包裝進行了很多分發,請檢查右側的表格以獲取更多信息。
在每個版本上構建了Linux(包括ARM),MAC OS和Windows的靜態鏈接(如果可能的話)二進製文件。
您可以在發行頁面上的每個版本下載為客戶端和守護程序( pueue and pueued )下載二進製文件。
只需為您的系統下載兩個二進製文件,將它們重命名為pueue和pueued ,然後將它們放在您的$PATH /PROGRAD文件夾中。
Pueue是為當前stable生鏽版本建造的。它可能會在較舊的版本上進行編譯,但沒有對其進行測試或正式支持。
cargo install --locked pueue這將安裝puueue到$CARGO_HOME/bin/pueue (默認為~/.cargo/bin/pueue )
Pueue是為當前stable生鏽版本建造的。它可能會在較舊的版本上進行編譯,但沒有對其進行測試或正式支持。
git clone [email protected]:Nukesor/pueue
cd pueue
cargo build --release --locked --path ./pueue最終的二進製文件將位於target/release/{pueue,pueued}中。
檢查Wiki以開始:)。
也有詳細的部分(希望)每個重要功能:
最重要的是,所有命令都有一個幫助選項(-h)。
Interact with the Pueue daemon
Usage: pueue [OPTIONS] [COMMAND]
Commands:
add Enqueue a task for execution.
There're many different options when scheduling a task.
Check the individual option help texts for more information.
Furthermore, please remember that scheduled commands are executed via your system shell.
This means that the command needs proper shell escaping.
The safest way to preserve shell escaping is to surround your command with quotes, for example:
pueue add 'ls $HOME && echo "Some string"'
remove Remove tasks from the list. Running or paused tasks need to be killed first
switch Switches the queue position of two commands. Only works on queued and stashed commands
stash Stashed tasks won't be automatically started. You have to enqueue them or start them by hand
enqueue Enqueue stashed tasks. They'll be handled normally afterwards
start Resume operation of specific tasks or groups of tasks.
By default, this resumes the default group and all its tasks.
Can also be used force-start specific tasks.
restart Restart failed or successful task(s).
By default, identical tasks will be created and enqueued, but it's possible to restart in-place.
You can also edit a few properties, such as the path and the command, before restarting.
pause Either pause running tasks or specific groups of tasks.
By default, pauses the default group and all its tasks.
A paused queue (group) won't start any new tasks.
kill Kill specific running tasks or whole task groups..
Kills all tasks of the default group when no ids or a specific group are provided.
send Send something to a task. Useful for sending confirmations such as 'yn'
edit Edit the command, path or label of a stashed or queued task.
By default only the command is edited.
Multiple properties can be added in one go.
group Use this to add or remove groups.
By default, this will simply display all known groups.
status Display the current status of all tasks
format-status Accept a list or map of JSON pueue tasks via stdin and display it just like "pueue status".
A simple example might look like this:
pueue status --json | jq -c '.tasks' | pueue format-status
log Display the log output of finished tasks.
Only the last few lines will be shown by default.
If you want to follow the output of a task, please use the "follow" subcommand.
follow Follow the output of a currently running task. This command works like "tail -f"
wait Wait until tasks are finished.
By default, this will wait for all tasks in the default group to finish.
Note: This will also wait for all tasks that aren't somehow 'Done'.
Includes: [Paused, Stashed, Locked, Queued, ...]
clean Remove all finished tasks from the list
reset Kill all tasks, clean up afterwards and reset EVERYTHING!
shutdown Remotely shut down the daemon. Should only be used if the daemon isn't started by a service manager
parallel Set the amount of allowed parallel tasks
By default, adjusts the amount of the default group.
No tasks will be stopped, if this is lowered.
This limit is only considered when tasks are scheduled.
completions Generates shell completion files. This can be ignored during normal operations
help Print this message or the help of the given subcommand(s)
Options:
-v, --verbose... Verbose mode (-v, -vv, -vvv)
--color <COLOR> Colorize the output; auto enables color output when connected to a tty [default: auto] [possible values: auto, never, always]
-c, --config <CONFIG> If provided, Pueue only uses this config file. This path can also be set via the "PUEUE_CONFIG_PATH" environment variable. The commandline option overwrites the environment variable!
-p, --profile <PROFILE> The name of the profile that should be loaded from your config file
-h, --help Print help
-V, --version Print version
Pueue設計為單個用戶的方便輔助工具。
它應該獨立起作用,而無需任何外部集成。這個想法是保持簡單並防止功能蠕變。
另外, Pueue被認為是功能完整嗎?所有計劃的功能都已添加,只有較小的改進,錯誤修復和定期維護工作才能合併。
根據記錄,未包含以下功能,因為它們超出了範圍:
pueue-lib庫,該pueued提供適當的API呼籲。但是,請記住, pueued仍然應該是最小的任務執行人,其計劃邏輯盡可能少。似乎需要某些項目滿足上述所有這些要點的需求,但這將是另一個工具的工作。我非常鼓勵朝鮮普韋埃(Pueue),我希望看到叉子成長為其他很酷的項目!
Slurm是一種豐富且廣泛使用的集群管理和調度系統的功能。如果您發現自己需要復雜的設置,例如多個工作池或分佈式節點,那麼Slurm將比Pueue好得多。
具有基於文本的流刊和n-retries的功能強大且功能豐富的並行處理器。 GNU並行能夠擴展到多主宿主並行化,並且具有復雜的代碼,可以在不同的工具和外殼以及其他高級功能之間進行深層集成。 Pueue通過更多地關注許多不同長期運行的命令的可見性,並為存儲命令的中心位置而不是GNU並行的關注對特定任務的關注,從而使自己與GNU平行區分開來。
PM2是一種流程管理工具,其重點更多地是對經常性和長期任務的管理。它似乎很成熟並且具有豐富的界面。
一個非常輕巧的工作隊列系統,不需要設置,維護,監督或任何長期運行的過程。
鏈接到項目
Task Spooler是一個Unix批處理系統,任務螺母又一個接一個地運行。
鏈接到ubuntu manpage和github上的叉子。原始網站似乎已經關閉。
非常感謝並歡迎使用功能請求和拉動請求!
無論如何,在開始黑客之前,請與我談談您的想法!很高興知道您在做什麼,我可能會有一些建議或技巧:)
根據貢獻的類型,您應該從main分支分支。 Pueue已經足夠成熟,不再需要development分支,並且在推動新版本之前,所有更改都在那裡收集。緊急的熱程序可能會被部署在一個單獨的分支機構上,但這將根據具體情況決定。
還有《建築指南》,該指南應該為您提供簡要概述和項目的介紹。
版權所有©2019 Arne Beer(@nukesor)