277
command *commandpb.Command,
278
msgs *collection.IndexedTakeList[string, *protocolpb.Message],
280
>
281
>
metrics.CommandCounter.With(handler.metricsHandler).
282
>
Record(1, metrics.CommandTypeTag(command.GetCommandType().String()))
283
>
var response *handleCommandResponse
284
>
var historyEvent *historypb.HistoryEvent
285
>
var err error
286
>
287
>
// TODO: ideally history events should not be exposed here. We should be passing the command
288
>
// all the way down but it requires a bigger refactor of the mutable state interface.
289
>
switch command.GetCommandType() {
290
case enumspb.COMMAND_TYPE_SCHEDULE_ACTIVITY_TASK:
291
historyEvent, response, err = handler.handleCommandScheduleActivity(ctx, command.GetScheduleActivityTaskCommandAttributes())