Skip to content

[Refactoring] Add unique task IDs to detach queue position from internal task handling logic. #661

@Nukesor

Description

@Nukesor

Based on discussions in #660

The current logic uses task ids as both their internal "unique id" as well as the queue position.
While this is simple and makes the code fairly straight forward, it makes some other things hard/impossible, such as shuffling around queue positions of already running tasks.

To address this issue:

  • Add a unique ID to each task on creation in the daemon. (ID format to be decided. human readable/writable would be nice)
  • Use that unique Id for all logic (log file handling, etc).
  • Make all commandline arguments able to handle either the queue position or that unqiue ID.
    The old behaviour should stay in place, as using queue positions will still be unique and they're a very intuitive way to address tasks.
  • The --print-task-id parameter should return the unique ID.

By doing it that way, we should be able to stay pretty much backwards compatible (from a CLI) perspective.

We will, however, definitely break existing states. So this will need a new major version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    s: ClientThis issue touches the pueue clients: DaemonThis issue touches pueue daemons: Pueue-libThis issue touches the pueue-lib libraryt: EnhancementSomething that exists, but could be made better

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions