File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed
packages/durabletask-js/src Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import { FailureDetails } from "../task/failure-details";
2424import { Logger , ConsoleLogger } from "../types/logger.type" ;
2525import { StartOrchestrationOptions } from "../task/options" ;
2626import { mapToRecord } from "../utils/tags.util" ;
27+ import { populateTagsMap } from "../utils/pb-helper.util" ;
2728
2829// Re-export MetadataGenerator for backward compatibility
2930export { MetadataGenerator } from "../utils/grpc-helper.util" ;
@@ -188,12 +189,7 @@ export class TaskHubGrpcClient {
188189 req . setInput ( i ) ;
189190 req . setScheduledstarttimestamp ( ts ) ;
190191
191- if ( tags ) {
192- const tagsMap = req . getTagsMap ( ) ;
193- for ( const [ key , value ] of Object . entries ( tags ) ) {
194- tagsMap . set ( key , value ) ;
195- }
196- }
192+ populateTagsMap ( req . getTagsMap ( ) , tags ) ;
197193
198194 this . _logger . info ( `Starting new ${ name } instance with ID = ${ req . getInstanceid ( ) } ` ) ;
199195
Original file line number Diff line number Diff line change @@ -254,7 +254,7 @@ export function getStringValue(val?: string): StringValue | undefined {
254254 * to store tag key-value pairs.
255255 * @param tags - An optional record of tag key-value pairs to add to the map.
256256 */
257- function populateTagsMap (
257+ export function populateTagsMap (
258258 tagsMap : { set : ( key : string , value : string ) => void } ,
259259 tags ?: Record < string , string > ,
260260) : void {
You can’t perform that action at this time.
0 commit comments