Im compressing a big volume of files, but it does
t give me any continuous feedback.
is the setInterval a good solution to do that?
Can you provide more context, I guess that zip
is an activity?
but it does
t give me any continuous feedback.
do you need to see the progression within the UI or something similar?
The main purpose of Hearbeat is to inform the Temporal Server that the activity is still running. You won’t see it unless you run describeWorklowExecution
from some workflow client or get the value from your activity activityInfo().heartbeatDetails
Antonio
Hello @antonio.perez thank you for trying to help me!
The compression process is an activity within a larger workflow.
The execution of the zip command takes a long time to complete because I am compressing a large volume of data (therefore, I see the need to signal to the temporal that the activity is still ongoing).
I decided to use setInterval to run the heartbeat every 10 minutes and stop it at the end of the compression.
I would like to know if in situations where we do not have continuous feedback from the ongoing process, there is a better way to signal the temporal that the process is still happening.
Thanks for the clarification @supermoykadev
I think your implementation is correct.
Note that heartbeat is throttled to the 80% of the activityHeartbeatTimeout Detecting Activity failures | Temporal Documentation . If you want the server to detect the worker failure as soon as possible maybe you have to set the heartbeat timeout to a lower value and heartbeat more often.
Antonio
Thank you very much!