Skip to content

Commit

Permalink
avoid nested db functions
Browse files Browse the repository at this point in the history
  • Loading branch information
sonroyaalmerol committed Nov 17, 2024
1 parent 31f2190 commit 5afbd25
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions internal/store/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,6 @@ func (store *Store) GetJob(id string) (*Job, error) {
return nil, fmt.Errorf("GetJob: error scanning job row -> %w", err)
}

exclusions, err := store.GetAllJobExclusions(id)
if err == nil {
job.Exclusions = exclusions
}

if job.LastRunUpid != nil {
task, err := store.GetTaskByUPID(*job.LastRunUpid)
if err != nil {
Expand Down Expand Up @@ -329,11 +324,6 @@ func (store *Store) GetAllJobs() ([]Job, error) {
return nil, fmt.Errorf("GetAllJobs: error scanning job row -> %w", err)
}

exclusions, err := store.GetAllJobExclusions(job.ID)
if err == nil {
job.Exclusions = exclusions
}

if job.LastRunUpid != nil {
task, err := store.GetTaskByUPID(*job.LastRunUpid)
if err != nil {
Expand Down

0 comments on commit 5afbd25

Please sign in to comment.