Skip to content
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

Use rpcBaseUrl in durable operations when possible #1098

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions release_notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Use rpcBaseUrl in Durable operations when possible
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ function Get-DurableStatus {
$DurableClient = GetDurableClientFromModulePrivateData
}

$requestUrl = "$($DurableClient.BaseUrl)/instances/$InstanceId"
if ($DurableClient.rpcBaseUrl) {
$requestUrl = "$($DurableClient.rpcBaseUrl)/instances/$InstanceId"
} else {
$requestUrl = "$($DurableClient.BaseUrl)/instances/$InstanceId"
}

$query = @()
if ($ShowHistory.IsPresent) {
Expand Down Expand Up @@ -158,8 +162,12 @@ function Stop-DurableOrchestration {
$DurableClient = GetDurableClientFromModulePrivateData
}

$requestUrl = "$($DurableClient.BaseUrl)/instances/$InstanceId/terminate?reason=$([System.Web.HttpUtility]::UrlEncode($Reason))"

if ($DurableClient.rpcBaseUrl) {
$requestUrl = "$($DurableClient.rpcBaseUrl)/instances/$InstanceId/terminate?reason=$([System.Web.HttpUtility]::UrlEncode($Reason))"
} else {
$requestUrl = "$($DurableClient.BaseUrl)/instances/$InstanceId/terminate?reason=$([System.Web.HttpUtility]::UrlEncode($Reason))"
}

Invoke-RestMethod -Uri $requestUrl -Method 'POST'
}

Expand Down Expand Up @@ -297,7 +305,12 @@ function GetRaiseEventUrl(
[string] $ConnectionName,
[string] $AppCode) {

$RequestUrl = $DurableClient.BaseUrl + "/instances/$InstanceId/raiseEvent/$EventName"

if ($DurableClient.rpcBaseUrl) {
$RequestUrl = $DurableClient.rpcBaseUrl + "/instances/$InstanceId/raiseEvent/$EventName"
} else {
$RequestUrl = $DurableClient.BaseUrl + "/instances/$InstanceId/raiseEvent/$EventName"
}

$query = @()
if ($null -eq $TaskHubName) {
Expand Down
Loading