mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-12-11 18:13:07 +01:00
Add check in initDB importer if jobMeta is nil
This commit is contained in:
@@ -74,6 +74,11 @@ func InitDB() error {
|
||||
for jobContainer := range ar.Iter(false) {
|
||||
|
||||
jobMeta := jobContainer.Meta
|
||||
if jobMeta == nil {
|
||||
cclog.Warn("skipping job with nil metadata")
|
||||
errorOccured++
|
||||
continue
|
||||
}
|
||||
|
||||
// Bundle 100 inserts into one transaction for better performance
|
||||
if i%100 == 0 {
|
||||
|
||||
Reference in New Issue
Block a user