File tree 1 file changed +13
-0
lines changed
src/Azure.Functions.Cli/Common
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ internal class DurableManager : IDurableManager
30
30
31
31
private string _connectionStringKey ;
32
32
33
+ private int ? _partitionCount ;
34
+
33
35
public const string DefaultConnectionStringKey = "AzureWebJobsStorage" ;
34
36
35
37
public const string DefaultTaskHubName = "DurableFunctionsHub" ;
@@ -80,6 +82,12 @@ private void SetConnectionStringAndTaskHubName()
80
82
?? _connectionStringKey ;
81
83
_taskHubName = durableTask . GetValue ( "HubName" , StringComparison . OrdinalIgnoreCase ) ? . ToString ( )
82
84
?? _taskHubName ;
85
+
86
+ if ( durableTask . TryGetValue ( "storageProvider" , StringComparison . OrdinalIgnoreCase , out JToken storageProviderToken ) )
87
+ {
88
+ JObject storageProviderObject = storageProviderToken as JObject ;
89
+ _partitionCount = storageProviderObject ? . GetValue ( "partitionCount" , StringComparison . OrdinalIgnoreCase ) ? . Value < int ? > ( ) ;
90
+ }
83
91
}
84
92
}
85
93
else
@@ -110,6 +118,11 @@ private void SetStorageServiceAndTaskHubClient(out AzureStorageOrchestrationServ
110
118
StorageConnectionString = connectionString ,
111
119
} ;
112
120
121
+ if ( _partitionCount . HasValue )
122
+ {
123
+ settings . PartitionCount = _partitionCount . Value ;
124
+ }
125
+
113
126
orchestrationService = new AzureStorageOrchestrationService ( settings ) ;
114
127
taskHubClient = new TaskHubClient ( orchestrationService ) ;
115
128
}
You can’t perform that action at this time.
0 commit comments