-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REST Service to Enqueue Tasks #14
Comments
I'm working on smth like that on my test setup. I'm building an API for a customer and playing with My current setup
How it works
Current issues
// Repack to the full Runner Result
out := APIResponseMessage{
Service: serviceName,
Api: resourceName,
Data: res,
}
buf, err := json.Marshal(&out)
if err != nil {
return sendAPIError(ctx, http.StatusInternalServerError, "Failed to serialize Runner Response")
}
// Now, we have to return the Runner response
err = ctx.JSONBlob(http.StatusCreated, buf)
if err != nil {
return sendAPIError(ctx, http.StatusInternalServerError, "Failed to send response")
} So my best idea is to save an REST request context Wrapping up, the issue implementing this REST service is to relate the request context with It's also possible to use Redis, but it seems an overhead to add another infra level just to impl an API. Those are my thoughts on how to get that dome |
We can certainly expand the asyncjobs concept of a job here to have a map[string]interface{} style arbitrary "additional info" kind of field where you can store this? |
Our jobs are essentially store in a KV - though slightly specialised to disable some specific KV behaviours that we didn't need |
For the API we'd need at least these I think, though open to suggestions of course.
And then similar for Queues and Schedules tasks. I'd like a server sent events endpoint to watch execution of a specific task also Regarding other stuff - mainly I need a full work queue system with a DAG of related jobs and parallel execution. But I am working on some closed source related stuff which might become open later. |
Of course we can start with just the important ones - i added some emojis to indicate those |
A REST service should be able to front a specific queue or multiple queues, it should accept requests over HTTP(s) and enqueue into JetStream
The text was updated successfully, but these errors were encountered: