Skip to content
Snippets Groups Projects
Commit e3165605 authored by Travis Ralston's avatar Travis Ralston
Browse files

Fix contexts in the import controller as well

See d0c83eb4
parent 4a22c6c5
No related branches found
No related tags found
No related merge requests found
...@@ -4,6 +4,7 @@ import ( ...@@ -4,6 +4,7 @@ import (
"archive/tar" "archive/tar"
"bytes" "bytes"
"compress/gzip" "compress/gzip"
"context"
"database/sql" "database/sql"
"encoding/json" "encoding/json"
"errors" "errors"
...@@ -130,6 +131,9 @@ func processArchive(data io.Reader) (map[string]*bytes.Buffer, error) { ...@@ -130,6 +131,9 @@ func processArchive(data io.Reader) (map[string]*bytes.Buffer, error) {
} }
func doImport(updateChannel chan *importUpdate, taskId int, importId string, ctx rcontext.RequestContext) { func doImport(updateChannel chan *importUpdate, taskId int, importId string, ctx rcontext.RequestContext) {
// Use a new context in the goroutine
ctx.Context = context.Background()
ctx.Log.Info("Preparing for import...") ctx.Log.Info("Preparing for import...")
fileMap := make(map[string]*bytes.Buffer) fileMap := make(map[string]*bytes.Buffer)
stopImport := false stopImport := false
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment