Release database connection when not needed anymore
()
| 151 | |
| 152 | // Release database connection when not needed anymore |
| 153 | func releaseDatabaseConnection() error { |
| 154 | if dbRequests == nil { |
| 155 | return nil |
| 156 | } |
| 157 | |
| 158 | errCh := make(chan error) |
| 159 | dbRequests <- dbRequest{releasedb, errCh} |
| 160 | return <-errCh |
| 161 | } |
| 162 | |
| 163 | // runs tasks in background. Acquires database connection first. |
| 164 | func runTaskInBackground(name string, resources []string, proc task.Process) (task.Task, *task.ResourceConflictError) { |
no outgoing calls
no test coverage detected