-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add send_local_queue_message and rename workerTask to ImmediateTask #9
Conversation
0e74d59
to
278121e
Compare
e2f4ba1
to
d709ce6
Compare
698b043
to
a9d0685
Compare
api-schema/xdb.yaml
Outdated
@@ -84,7 +84,31 @@ paths: | |||
application/json: | |||
schema: | |||
$ref: '#/components/schemas/ApiErrorResponse' | |||
# xdb workers APIs are hosted by iWF applications via SDKs, for iWF server to call back | |||
/api/v1/xdb/service/process-execution/send-message-to-local-queue: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we said the name is too long, I have been thinking the name. Actually in iwf, it's called publish_to_internal_channel
. Maybe we can also call it publish_to_local_queue
here? which one do you think is "slightly" better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and potentially in the future, the API can publish multiple messages at the same time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
publish-to-local-queue
sounds good to me!
api-schema/xdb.yaml
Outdated
@@ -521,4 +583,23 @@ components: | |||
enum: | |||
- TERMINATE # default behaviour. ProcessStatus becomes TERMINATED | |||
- FAIL # ProcessStatus becomes FAILED | |||
ProcessExecutionPublishToLocalQueueRequest: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just PublishToLocalQueueRequest
? I feel like that's clear enough as it has local
in the name
api-schema/xdb.yaml
Outdated
type: string | ||
queueName: | ||
type: string | ||
dedupId: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually, maybe we can just let it publish an array from beginning. It doesn't seem like a lot of additional work to implement. And doing it later will require a lot of refactoring and backward compatibility work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case you forget, we actually allow publishing messages at waitUntil/execute APIs. This is an mechanism for multiple states communication. You can add it separately, but I feel like it's easier to add it in the same api PR, and implement them increamentally in server/sdk.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm cc @duoertai as well as he will be working on timer command later which will need to do something similar
No description provided.