DenoDDeno
Powered by
FridiousF
Denoβ€’3y agoβ€’
3 replies
Fridious

Rust sdk register_actity_type

Hey, I am using the core_sdk in rust. I registered an activity, which should be able to consume following ts type:
functionName: string, parameters: any, second: any
functionName: string, parameters: any, second: any
(data attached in screenshot).
My rust code:
worker.register_activity("echo_activity", |_ctx: ActContext, parameters: Value| async move {
worker.register_activity("echo_activity", |_ctx: ActContext, parameters: Value| async move {
(Value is from type of serde value)
If I use the code above,
parameters
parameters
is just the data of
second
second
->
{ "second": true}
{ "second": true}
, so the last object in the array data is parsend into parameters.
I also tried to use Vec<Value>, but then the activity just stuck and nothing happens. I also got no error and the workflow is also stuck in state Running
image.png
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

deno in rust
webbdaysWwebbdays / help
2y ago
regex pattern in rust
webbdaysWwebbdays / help
2y ago
Rust run JS/TS
cycptCcycpt / help
3y ago
wasmbuild & rust module path
foobarFfoobar / help
3y ago