Diju collector error
The crawler errors, because we don't init the context in the Run() method of diju collector
{"cmd":"collect","level":"info","msg":"Collection data from remote source","pkg":"cmd","provider":"diju","time":"2022-03-08T13:05:19Z"}
{"elastic-host":"http://elasticsearch-master-headless:9200","elastic-index":"metagrid","level":"info","msg":"Connect to elastic search","pkg":"elasticsearch","time":"2022-03-08T13:05:19Z"}
{"level":"info","msg":"Start the crawling loop","pkg":"collect","time":"2022-03-08T13:05:19Z"}
{"level":"info","msg":"Size of the queue is 1","time":"2022-03-08T13:05:19Z"}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0xd61b7c]
goroutine 1 [running]:
metagrid/collect.(*Collect).persist(0xc00007f300, 0x11862f8, 0xc00075e0c0, 0xc000346060)
/go/src/source.dodis.ch/metagrid-go/metagid-go/collect/collect.go:319 +0x87c
metagrid/collect.(*Collect).Run(0xc00007f300, 0x7ffd23e35809, 0x4)
/go/src/source.dodis.ch/metagrid-go/metagid-go/collect/collect.go:160 +0x5ed
metagrid/cmd.glob..func1(0x1815340, 0xc0003375a0, 0x1, 0x1)
/go/src/source.dodis.ch/metagrid-go/metagid-go/cmd/collect.go:37 +0x26c
github.com/spf13/cobra.(*Command).execute(0x1815340, 0xc000337570, 0x1, 0x1, 0x1815340, 0xc000337570)
/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:860 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0x1815fc0, 0x407ea5, 0xc0000400b8, 0x401260)
/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:974 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:902
metagrid/cmd.Execute()
/go/src/source.dodis.ch/metagrid-go/metagid-go/cmd/root.go:45 +0x31
main.main()
/go/src/source.dodis.ch/metagrid-go/metagid-go/main.go:23 +0x25