mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-12-13 10:56:17 +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) {
|
for jobContainer := range ar.Iter(false) {
|
||||||
|
|
||||||
jobMeta := jobContainer.Meta
|
jobMeta := jobContainer.Meta
|
||||||
|
if jobMeta == nil {
|
||||||
|
cclog.Warn("skipping job with nil metadata")
|
||||||
|
errorOccured++
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
// Bundle 100 inserts into one transaction for better performance
|
// Bundle 100 inserts into one transaction for better performance
|
||||||
if i%100 == 0 {
|
if i%100 == 0 {
|
||||||
|
|||||||
Reference in New Issue
Block a user