mirror of https://github.com/dapr/docs.git
Merge branch 'v1.14' into actor-state-clarification
This commit is contained in:
commit
2f23f60405
|
@ -38,11 +38,9 @@ The diagram below is an overview of how Dapr's service invocation works when inv
|
||||||
<img src="/images/service-invocation-overview-non-dapr-endpoint.png" width=800 alt="Diagram showing the steps of service invocation to non-Dapr endpoints">
|
<img src="/images/service-invocation-overview-non-dapr-endpoint.png" width=800 alt="Diagram showing the steps of service invocation to non-Dapr endpoints">
|
||||||
|
|
||||||
1. Service A makes an HTTP call targeting Service B, a non-Dapr endpoint. The call goes to the local Dapr sidecar.
|
1. Service A makes an HTTP call targeting Service B, a non-Dapr endpoint. The call goes to the local Dapr sidecar.
|
||||||
2. Dapr discovers Service B's location using the `HTTPEndpoint` or FQDN URL.
|
2. Dapr discovers Service B's location using the `HTTPEndpoint` or FQDN URL then forwards the message to Service B.
|
||||||
3. Dapr forwards the message to Service B.
|
3. Service B sends a response to Service A's Dapr sidecar.
|
||||||
4. Service B runs its business logic code.
|
4. Service A receives the response.
|
||||||
5. Service B sends a response to Service A's Dapr sidecar.
|
|
||||||
6. Service A receives the response.
|
|
||||||
|
|
||||||
## Using an HTTPEndpoint resource or FQDN URL for non-Dapr endpoints
|
## Using an HTTPEndpoint resource or FQDN URL for non-Dapr endpoints
|
||||||
There are two ways to invoke a non-Dapr endpoint when communicating either to Dapr applications or non-Dapr applications. A Dapr application can invoke a non-Dapr endpoint by providing one of the following:
|
There are two ways to invoke a non-Dapr endpoint when communicating either to Dapr applications or non-Dapr applications. A Dapr application can invoke a non-Dapr endpoint by providing one of the following:
|
||||||
|
|
|
@ -749,7 +749,7 @@ def status_monitor_workflow(ctx: wf.DaprWorkflowContext, job: JobStatus):
|
||||||
ctx.call_activity(send_alert, input=f"Job '{job.job_id}' is unhealthy!")
|
ctx.call_activity(send_alert, input=f"Job '{job.job_id}' is unhealthy!")
|
||||||
next_sleep_interval = 5 # check more frequently when unhealthy
|
next_sleep_interval = 5 # check more frequently when unhealthy
|
||||||
|
|
||||||
yield ctx.create_timer(fire_at=ctx.current_utc_datetime + timedelta(seconds=next_sleep_interval))
|
yield ctx.create_timer(fire_at=ctx.current_utc_datetime + timedelta(minutes=next_sleep_interval))
|
||||||
|
|
||||||
# restart from the beginning with a new JobStatus input
|
# restart from the beginning with a new JobStatus input
|
||||||
ctx.continue_as_new(job)
|
ctx.continue_as_new(job)
|
||||||
|
@ -896,7 +896,7 @@ func StatusMonitorWorkflow(ctx *workflow.WorkflowContext) (any, error) {
|
||||||
}
|
}
|
||||||
if status == "healthy" {
|
if status == "healthy" {
|
||||||
job.IsHealthy = true
|
job.IsHealthy = true
|
||||||
sleepInterval = time.Second * 60
|
sleepInterval = time.Minutes * 60
|
||||||
} else {
|
} else {
|
||||||
if job.IsHealthy {
|
if job.IsHealthy {
|
||||||
job.IsHealthy = false
|
job.IsHealthy = false
|
||||||
|
@ -905,7 +905,7 @@ func StatusMonitorWorkflow(ctx *workflow.WorkflowContext) (any, error) {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sleepInterval = time.Second * 5
|
sleepInterval = time.Minutes * 5
|
||||||
}
|
}
|
||||||
if err := ctx.CreateTimer(sleepInterval).Await(nil); err != nil {
|
if err := ctx.CreateTimer(sleepInterval).Await(nil); err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
|
|
Loading…
Reference in New Issue