Pueue هي أداة لإدارة المهام لخط الأوامر للتنفيذ المتسلسل والمتوازي للمهام طويلة الأجل.
ببساطة ، إنها أداة يتمثل في q ueue من أوامر shell. علاوة على ذلك ، هناك الكثير من الميزات والتجريدات المريحة.
نظرًا لأن Pueue غير مرتبط بأي محطة ، يمكنك التحكم في مهامك من أي محطة على نفس الجهاز. ستتم معالجة قائمة الانتظار بشكل مستمر ، حتى لو لم يعد لديك أي جلسات SSH نشطة.
يعتبر Pueue مكتمل الميزات؟ تمت إضافة جميع الميزات التي تم التخطيط لها ، وسيتم دمج التحسينات الطفيفة فقط ، ومثبتات الأخطاء وأعمال الصيانة المنتظمة.
pueued في الخلفية. لا داعي لتسجيل الدخول.log status إذا كنت ترغب في عرض معلومات حول المهام في برنامج آخر.wait للانتظار لانتظار مهام محددة ، تنتهي مجموعة (أو كل شيء).لم يتم تصميم Pueue ليكون جدولة/مهام قابلة للبرمجة (Scriptable).
يكمن تركيز pueue على التفاعل البشري ، أي من المفترض أن يستخدمه شخص حقيقي على نوع من نظام التشغيل. انظر قسم أهداف التصميم
بسبب هذا ، تم الحفاظ على مجموعة الميزات من pueue و pueued وكذلك تنفيذها والهندسة المعمارية بسيطة حسب التصميم! على الرغم من أنه يمكن كتابة النص إلى حد ما ، إلا أنه لم يتم بناؤه لهذا ولا يوجد دعم رسمي!
من المؤكد أن هناك حاجة إلى جدولة/منفذ المهام المعقدة مع خيارات الوصول والجدولة المتقدمة للوصول إلى واجهة برمجة التطبيقات (API) ، ولكن هذه هي الوظيفة لمشروع آخر ، لأن هذا ليس ما تم بناؤه Pueue.
هناك بعض الطرق المختلفة لتثبيت Pueue.
الطريقة المفضلة لتثبيت Pueue هي استخدام مدير حزمة النظام الخاص بك. سيؤدي ذلك عادةً إلى نشر ملفات الخدمة وإكمالها تلقائيًا.
تم تعبئة Pueue لعدد قليل من التوزيعات ، تحقق من الجدول على اليمين لمزيد من المعلومات.
ثنائيات مرتبطة بشكل ثابت (إن أمكن) لـ Linux (incl. ARM) ، يتم بناء Mac OS و Windows على كل إصدار.
يمكنك تنزيل الثنائيات للعميل والخفي ( pueue و pueued ) لكل إصدار على صفحة الإصدار.
ما عليك سوى تنزيل كلا الثنائيات لنظامك ، وقم بإعادة تسميته إلى pueue و pueued ووضعهما في مجلد $PATH /Program.
تم تصميم Pueue لإصدار الصدأ stable الحالي. قد يتم تجميعها على الإصدارات القديمة ، ولكن هذا لم يتم اختباره أو دعمه رسميًا.
cargo install --locked pueue سيؤدي ذلك إلى تثبيت Pueue على $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} .
تحقق من الويكي للبدء :).
هناك أيضًا أقسام مفصلة لـ (على أمل) كل ميزة مهمة:
علاوة على ذلك ، هناك خيار مساعدة (-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 ، والتي توفر مكالمات API المناسبة ل pueued . ومع ذلك ، ضع في اعتبارك أن pueued لا يزال من المفترض أن يكون منفذ المهمة الحد الأدنى مع القليل من منطق الجدولة قدر الإمكان.يبدو أن هناك حاجة إلى بعض المشاريع التي تفي بكل هذه النقاط المذكورة أعلاه ، ولكن هذه ستكون مهمة أداة أخرى. أنا أشجع بشدة Forking Pueue وأحب أن أرى الشوكات تنمو إلى مشاريع رائعة أخرى!
SLURM هي ميزة غنية ومستخدمة على نطاق واسع إدارة الجدولة. إذا وجدت نفسك في الحاجة إلى إعدادات معقدة مثل تجمعات العمال المتعددة أو العقد الموزعة ، فسيكون Slurm أكثر ملاءمة من Pueue.
معالج متوازي قوي ومميز مع Joblog و N-Retries. GNU Parallel قادر على توسيع نطاق التوازي المتعدد المضيف ولديه رمز معقد للحصول على تكامل عميق عبر أدوات وقذائف مختلفة ، وكذلك الميزات المتقدمة الأخرى. يميز Pueue نفسه عن GNU Parallel من خلال التركيز أكثر على الرؤية عبر العديد من الأوامر الطويلة المختلفة ، وإنشاء موقع مركزي للأوامر التي يتم تخزينها ، بدلاً من تركيز GNU Parallel على صقل مهمة محددة.
PM2 هي أداة لإدارة العمليات ، والتي ينصب تركيزها على إدارة المهام المتكررة والحياة الطويلة. يبدو أنه ناضج للغاية وله واجهة غنية.
أنظمة قائمة انتظار الوظائف خفيفة الوزن للغاية لا تتطلب أي إعداد أو صيانة أو إشراف أو أي عمليات طويلة الأجل.
رابط للمشروع
Task Spooler هو نظام دفعات UNIX حيث تتجول المهام واحدة تلو الأخرى.
روابط إلى ManPage Ubuntu وشوكة على جيثب. يبدو أن الموقع الأصلي قد انخفض.
طلبات الميزات وطلبات السحب موضع تقدير كبير وترحيب!
على أي حال ، يرجى التحدث معي قليلاً عن أفكارك قبل البدء في القرصنة! من الجيد دائمًا معرفة ما تعمل عليه وقد يكون لدي بعض الاقتراحات أو النصائح :)
اعتمادًا على نوع مساهمتك ، يجب أن تتفرع من الفرع main . Pueue ناضج بما يكفي لعدم الحاجة إلى فرع development ويتم جمع جميع التغييرات هناك قبل دفع إصدار جديد. قد يتم نشر الإصلاحات الساخنة العاجلة على فرع منفصل ، ولكن سيتم تحديد ذلك على أساس كل حالة على حدة.
هناك أيضًا دليل الهندسة المعمارية ، والذي من المفترض أن يمنحك نظرة عامة موجزة ومقدمة للمشروع.
حقوق الطبع والنشر © 2019 Arne Beer (Nukesor)