mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2026-02-17 16:31:45 +01:00
Add error handling in tagger initialization
This commit is contained in:
@@ -51,10 +51,14 @@ func newTagger() {
|
|||||||
jobTagger.stopTaggers = append(jobTagger.stopTaggers, &JobClassTagger{})
|
jobTagger.stopTaggers = append(jobTagger.stopTaggers, &JobClassTagger{})
|
||||||
|
|
||||||
for _, tagger := range jobTagger.startTaggers {
|
for _, tagger := range jobTagger.startTaggers {
|
||||||
tagger.Register()
|
if err := tagger.Register(); err != nil {
|
||||||
|
cclog.Errorf("failed to register start tagger: %s", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for _, tagger := range jobTagger.stopTaggers {
|
for _, tagger := range jobTagger.stopTaggers {
|
||||||
tagger.Register()
|
if err := tagger.Register(); err != nil {
|
||||||
|
cclog.Errorf("failed to register stop tagger: %s", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user