Retrieve current process from leader, clone metadata, introduce new state 'deploying'

This commit is contained in:
Ingo Oppermann
2024-07-22 16:58:57 +02:00
parent 9e52f19a66
commit 879819f10f
19 changed files with 282 additions and 192 deletions

View File

@@ -2,6 +2,7 @@ package restream
import (
"errors"
"maps"
"time"
"github.com/datarhei/core/v16/ffmpeg/parse"
@@ -393,7 +394,11 @@ func (t *task) GetMetadata(key string) (interface{}, error) {
defer t.lock.RUnlock(token)
if len(key) == 0 {
return t.metadata, nil
if t.metadata == nil {
return nil, nil
}
return maps.Clone(t.metadata), nil
}
if t.metadata == nil {