Code Monkey home page Code Monkey logo

Comments (8)

Nukesor avatar Nukesor commented on June 11, 2024 1

Ping @makorne

from pueue.

Nukesor avatar Nukesor commented on June 11, 2024

What's your exact use case for pueue?
It sounds like you're trying to use it for scripting? In that case, you can use he --print-task-id flag on the add command, to get the id of a specific task. You can lateron use that Id to work with it.

from pueue.

Nukesor avatar Nukesor commented on June 11, 2024

Usage of labels as identifiers isn't supported, as labels aren't unique.
It's also not planned to add any other identifiers, as this is doesn't match Pueue's feature scope.

It's not designed to be a programmatic scheduler backend, it just has a few features that allow it to be used in such a way, even though in a very limited capacity.

from pueue.

makorne avatar makorne commented on June 11, 2024

Ok.
Thank you for your great help and work!

from pueue.

mantljosh avatar mantljosh commented on June 11, 2024

@Nukesor any chance of reconsidering this? My use case is for local development on a monorepo project where we can't use Docker as it is horrendously slow on OS X - so instead we run our services un-containerized during local development.

I want to be able to reference a long-running task (i.e. the service process) by name when I'm starting/logging/restarting etc. as I only want one instance of each, and task IDs are different every time depending on the order I end up starting services, so there's no way to have a stable command that always targets the same logical task.

Labels seem to be the closest thing right now, but I think really what I'd ideally want is the ability to specify the task ID so I can ensure a stable ID to reference the same logical tasks.

So far pueue is the closest tool to pm2 (which has been nothing but trouble for me) I've found, but if there are other tools you think are better suited for this I appreciate any suggestions.

from pueue.

Nukesor avatar Nukesor commented on June 11, 2024

Yep. Your use-case is something that sadly isn't something Pueue was designed for.

Tasks that're added to Pueue are supposed to end on their own at some point. It's basically a task queue with a very simple (by design) scheduler on top.

You're using it as a process manager, which isn't something it was built for.
pm2 is actually one of the solutions for your problems.

I've heard of another tool like this, but I don't remember the name of it right now 😓
I'll write as soon as I stumble upon it or if my brain starts working again ;D

from pueue.

Nukesor avatar Nukesor commented on June 11, 2024

What comes in mind is:
firestarter and circus

Alternatively overmind
Terminal multiplexers might also work, the classic tmux or zellij.
Tmux is pretty scriptable.

I would actually be up to write a nice alternative to pm2, if I find the time to do so, as I'm looking for a similar tool to run my game servers (which have an interactive shell).
For now I use scripted tmux sessions, but I'm not super happy about it yet.

from pueue.

mantljosh avatar mantljosh commented on June 11, 2024

Thanks for the reply and the suggestions! Took a look at those (and some others linked from those projects) and definitely some similarities, but none quite doing what PM2 aims to do.

I would actually be up to write a nice alternative to pm2, if I find the time to do so

I'm considering the same, but like you "if I find the time" is the tricky part :)

from pueue.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.