Cleanup: add and remove some comments
This commit is contained in:
parent
3bfd5a339f
commit
f497ac8536
@ -60,7 +60,6 @@ func (db *DB) ScheduleTask(ctx context.Context, w *Worker) (*Task, error) {
|
||||
}
|
||||
|
||||
// Found a task, now assign it to the requesting worker.
|
||||
// Without the Select() call, Gorm will try and also store task.Job in the jobs database, which is not what we want.
|
||||
if err := assignTaskToWorker(tx, w, task); err != nil {
|
||||
logger.Warn().
|
||||
Str("taskID", task.UUID).
|
||||
|
@ -47,6 +47,9 @@ func CreateTestDB(t *testing.T) (db *DB, closer func()) {
|
||||
var err error
|
||||
|
||||
dblogger := NewDBLogger(log.Level(zerolog.InfoLevel).Output(os.Stdout))
|
||||
|
||||
// Open the database ourselves, so that we have a low-level connection that
|
||||
// can be closed when the unit test is done running.
|
||||
sqliteConn, err := sql.Open(sqlite.DriverName, TestDSN)
|
||||
if err != nil {
|
||||
t.Fatalf("opening SQLite connection: %v", err)
|
||||
|
Loading…
x
Reference in New Issue
Block a user