MCPcopy Create free account
hub / github.com/temporalio/temporal / deserializeTaskWithCache

Method deserializeTaskWithCache

chasm/tree.go:3098–3113  ·  view source on GitHub ↗
(
	registrableTask *RegistrableTask,
	taskBlob *commonpb.DataBlob,
)

Source from the content-addressed store, hash-verified

3096}
3097
3098func (n *Node) deserializeTaskWithCache(
3099 registrableTask *RegistrableTask,
3100 taskBlob *commonpb.DataBlob,
3101) (taskValue reflect.Value, retErr error) {
3102 if cachedValue, ok := n.taskValueCache[taskBlob]; ok {
3103 return cachedValue, nil
3104 }
3105
3106 taskValue, err := deserializeTask(registrableTask, taskBlob)
3107 if err != nil {
3108 return reflect.Value{}, err
3109 }
3110
3111 n.taskValueCache[taskBlob] = taskValue
3112 return taskValue, nil
3113}
3114
3115func (n *Node) serializeTaskWithCache(
3116 registrableTask *RegistrableTask,

Callers 2

Calls 1

deserializeTaskFunction · 0.85

Tested by

no test coverage detected