Skip to content

Commit

Permalink
fix: use interface{} as matadata value
Browse files Browse the repository at this point in the history
  • Loading branch information
WangYihang committed Feb 28, 2024
1 parent 1d60fd1 commit f51821f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type Scheduler struct {
StatusFd io.WriteCloser
MetadataFilePath string
MetadataFd io.WriteCloser
Metadata map[string]string
Metadata map[string]interface{}
MaxRetries int
MaxRuntimePerTaskSeconds int
NumShards int64
Expand All @@ -43,7 +43,7 @@ type Scheduler struct {
func NewScheduler() *Scheduler {
scheduler := &Scheduler{
NumWorkers: 1,
Metadata: make(map[string]string),
Metadata: make(map[string]interface{}),
MaxRetries: 4,
MaxRuntimePerTaskSeconds: 16,
NumShards: 1,
Expand Down Expand Up @@ -155,7 +155,7 @@ func (s *Scheduler) SetTotalTasks(numTotalTasks int64) {
}

// AddMetadata adds metadata
func (s *Scheduler) SetMetadata(key, value string) *Scheduler {
func (s *Scheduler) SetMetadata(key string, value interface{}) *Scheduler {
if s.IsStarted {
panic("cannot add metadata after starting")
}
Expand Down

0 comments on commit f51821f

Please sign in to comment.