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)