Skip to content

best strategy to update job args (or other metadata) to send to subscription? #474

@vsoch

Description

@vsoch

Hi! Apologies for the many questions - I'm into a nice groove and am loving using River, and I've been searching code and discussions first before asking a question, to the best that I can.

I have most of what I want working, and the last step is that I want to be able to (after the worker is successful) have the subscription receive notification, but also receive a node assignment. For some context, this is replacing the Kubernetes scheduler, and the worker is getting the nodes to allocate, and we send back to the main schedule function as a list to send to the kubelet to ask to bind. The design thus far is here: converged-computing/fluxnetes#2 if you are interested.

I naively tried updating job.Args, knowing well that it likely wouldn't update the database (indeed it did not) and I'm wanting to ask what the best strategy would be for this. Ideally I don't want to make another event stream (or worker queue) just to deliver notice back - the events that are already delivered should be the single source of truth for the particular job. I was wondering if it might be possible to have something additional tied to the event to send back? I know there are statistics (and this is generally what we have to work with) and I'm wondering if something else could be exposed to allow the worker to add arbitrary metadata to send to subscribers.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions