Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • master
  • v1.0.0
  • v1.0.1
  • v1.1.0
  • v1.10.0
  • v1.10.1
  • v1.10.2
  • v1.11.0
  • v1.12.0
  • v1.12.1
  • v1.12.2
  • v1.12.3
  • v1.12.4
  • v1.12.5
  • v1.12.6
  • v1.12.7
  • v1.12.8
  • v1.13.0
  • v1.13.1
  • v1.13.2
  • v1.14.0
  • v1.15.0
  • v1.15.1
  • v1.15.10
  • v1.15.11
  • v1.15.12
  • v1.15.13
  • v1.15.14
  • v1.15.15
  • v1.15.16
  • v1.15.17
  • v1.15.2
  • v1.15.3
  • v1.15.4
  • v1.15.5
  • v1.15.6
  • v1.15.7
  • v1.15.8
  • v1.15.9
  • v1.16.0
  • v1.16.1
  • v1.17.0
  • v1.18.0
  • v1.18.1
  • v1.18.2
  • v1.19.0
  • v1.19.1
  • v1.19.2
  • v1.19.3
  • v1.19.4
  • v1.2.0
  • v1.20.0
  • v1.20.1
  • v1.20.2
  • v1.20.3
  • v1.21.0
  • v1.21.1
  • v1.22.0
  • v1.23.0
  • v1.23.1
  • v1.23.2
  • v1.3.0
  • v1.3.1
  • v1.3.2
  • v1.4.0
  • v1.5.0
  • v1.5.1
  • v1.6.0
  • v1.6.1
  • v1.7.0
  • v1.7.1
  • v1.7.2
  • v1.7.3
  • v1.8.0
  • v1.8.1
  • v1.9.0
76 results

Target

Select target project
  • oss/libraries/go/services/job-queues
1 result
Select Git revision
  • master
  • v1.0.0
  • v1.0.1
  • v1.1.0
  • v1.10.0
  • v1.10.1
  • v1.10.2
  • v1.11.0
  • v1.12.0
  • v1.12.1
  • v1.12.2
  • v1.12.3
  • v1.12.4
  • v1.12.5
  • v1.12.6
  • v1.12.7
  • v1.12.8
  • v1.13.0
  • v1.13.1
  • v1.13.2
  • v1.14.0
  • v1.15.0
  • v1.15.1
  • v1.15.10
  • v1.15.11
  • v1.15.12
  • v1.15.13
  • v1.15.14
  • v1.15.15
  • v1.15.16
  • v1.15.17
  • v1.15.2
  • v1.15.3
  • v1.15.4
  • v1.15.5
  • v1.15.6
  • v1.15.7
  • v1.15.8
  • v1.15.9
  • v1.16.0
  • v1.16.1
  • v1.17.0
  • v1.18.0
  • v1.18.1
  • v1.18.2
  • v1.19.0
  • v1.19.1
  • v1.19.2
  • v1.19.3
  • v1.19.4
  • v1.2.0
  • v1.20.0
  • v1.20.1
  • v1.20.2
  • v1.20.3
  • v1.21.0
  • v1.21.1
  • v1.22.0
  • v1.23.0
  • v1.23.1
  • v1.23.2
  • v1.3.0
  • v1.3.1
  • v1.3.2
  • v1.4.0
  • v1.5.0
  • v1.5.1
  • v1.6.0
  • v1.6.1
  • v1.7.0
  • v1.7.1
  • v1.7.2
  • v1.7.3
  • v1.8.0
  • v1.8.1
  • v1.9.0
76 results
Show changes
Commits on Source (1)
......@@ -306,6 +306,25 @@ func (m *Manager) removeJobInternal(id JobID) error {
}
// SaveJob saves a job to the database
func (m *Manager) SaveJob(job GenericJob) error {
if m == nil {
return ErrManagerNotInitialized
}
m.mu.Lock()
defer m.mu.Unlock()
if m.jobSyncer != nil {
return m.jobSyncer.SaveJob(job)
}
return nil
}
// UpdateJob updates a job in the database
func (m *Manager) UpdateJob(job GenericJob) error {
if m == nil {
......@@ -690,7 +709,6 @@ func (m *Manager) handleJobEvents() {
err := m.queue.Enqueue(job)
if err != nil && !errors.Is(err, ErrJobAlreadyExists) {
Error("Error while queueing job", "error", err)
}
case JobReady:
......@@ -733,9 +751,7 @@ func (m *Manager) handleJobEvents() {
eventBus := m.GetEventBus()
eventBus.Publish(JobFinished, nextJob)
}
}
}
}
......
......@@ -146,10 +146,6 @@ func (sp *SchedulerPersistence) UnmarshalYAML(unmarshal func(interface{}) error)
type Alias SchedulerPersistence
aux := &struct {
*Alias `yaml:",inline"`
//TimeString *string `yaml:"time,omitempty"`
//IntervalString *string `yaml:"interval,omitempty"`
//DelayString *string `yaml:"delay,omitempty"`
//EventFlagsString *string `yaml:"eventFlags,omitempty"`
}{
Alias: (*Alias)(sp),
}
......@@ -161,7 +157,6 @@ func (sp *SchedulerPersistence) UnmarshalYAML(unmarshal func(interface{}) error)
if err != nil {
return err
}
sp.Time = &t
}
......@@ -206,93 +201,3 @@ func (sp *SchedulerPersistence) UnmarshalYAML(unmarshal func(interface{}) error)
}
return nil
}
//type scheduleImportStruct struct {
// Time *string `yaml:"time,omitempty" json:"time,omitempty"`
// Interval *string `yaml:"interval,omitempty" json:"interval,omitempty"`
// Delay *string `yaml:"delay,omitempty" json:"delay,omitempty"`
// EventFlags *string `yaml:"eventFlags,omitempty" json:"eventFlags,omitempty"`
//
// Type string `yaml:"type" json:"type"`
// Spec string `yaml:"spec,omitempty" json:"spec,omitempty"`
// Event string `yaml:"event,omitempty" json:"event,omitempty"`
// Executed bool `yaml:"executed,omitempty" json:"executed,omitempty"`
// Path string `yaml:"path,omitempty" json:"path,omitempty"`
//}
//
//func (sp *SchedulerPersistence) parseAndAssignFields(aux scheduleImportStruct) error {
//
// sp.Type = aux.Type
// sp.Spec = aux.Spec
// sp.Event = EventName(aux.Event)
// sp.Executed = aux.Executed
// sp.Path = aux.Path
//
// if aux.Time != nil && *aux.Time != "" {
// var t time.Time
// var err error
// for _, format := range SupportedTimeFormats {
// t, err = time.Parse(format, *aux.Time)
// if err == nil {
// break
// }
// }
// if err != nil {
// return err
// }
// sp.Time = &t
// }
//
// if aux.Interval != nil && *aux.Interval != "" {
// d, err := time.ParseDuration(*aux.Interval)
// if err != nil {
// return err
// }
// sp.Interval = d
// }
//
// if aux.Delay != nil && *aux.Delay != "" {
// d, err := time.ParseDuration(*aux.Delay)
// if err != nil {
// return err
// }
// sp.Delay = d
// }
//
// if aux.EventFlags != nil && *aux.EventFlags != "" {
// sp.EventFlags = fsnotify.Op(0)
// for _, flag := range strings.Split(*aux.EventFlags, "|") {
// switch flag {
// case "Create":
// sp.EventFlags |= fsnotify.Create
// case "Write":
// sp.EventFlags |= fsnotify.Write
// case "Remove":
// sp.EventFlags |= fsnotify.Remove
// case "Rename":
// sp.EventFlags |= fsnotify.Rename
// case "Chmod":
// sp.EventFlags |= fsnotify.Chmod
// }
// }
// }
//
// return nil
//}
//// UnmarshalJSON implements the json.Unmarshaler interface
//func (sp *SchedulerPersistence) UnmarshalJSON(data []byte) error {
// var aux scheduleImportStruct
// if err := json.Unmarshal(data, &aux); err != nil {
// return err
// }
// return sp.parseAndAssignFields(aux)
//}
//
//func (sp *SchedulerPersistence) UnmarshalYAML(unmarshal func(interface{}) error) error {
// var aux scheduleImportStruct
// if err := unmarshal(&aux); err != nil {
// return err
// }
// return sp.parseAndAssignFields(aux)
//}