Skip to content

Commit

Permalink
chore: add logs when backup is skipped due to preferences (#2867)
Browse files Browse the repository at this point in the history
  • Loading branch information
BonapartePC committed Jan 11, 2023
1 parent 65774e2 commit 1d9320d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jobsdb/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,7 @@ func (jd *HandleT) createTableDumps(queryFunc func(int64) string, pathFunc func(
}
if !preferences.Backup(jd.tablePrefix) {
offset++
jd.logger.Infof("Skipping backup for workspace: %s. Preferences: %v and tablePrefix: %s", workspaceID, preferences, jd.tablePrefix)
continue
}
rawJSONRows = append(rawJSONRows, '\n') // appending '\n'
Expand Down Expand Up @@ -585,7 +586,7 @@ func (jd *HandleT) uploadTableDump(ctx context.Context, workspaceID, path string
jd.logger.Errorf("[JobsDB] :: Failed to upload table dump for workspaceId %s. Error: %s", workspaceID, err.Error())
return err
}
jd.logger.Infof("[JobsDB] :: Backed up table at %v", output.Location)
jd.logger.Infof("[JobsDB] :: Backed up table at %s for workspaceId %s", output.Location, workspaceID)
fileUploadTimeStat.End()
return nil
}
Expand Down
1 change: 1 addition & 0 deletions processor/stash/stash.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ func (st *HandleT) storeErrorsToObjectStorage(jobs []*jobsdb.JobT) (errorJob []E
}
prefixes := []string{"rudder-proc-err-logs", time.Now().Format("01-02-2006")}
uploadOutput, err := errFileUploader.Upload(context.TODO(), outputFile, prefixes...)
st.logger.Infof("Uploaded error logs to %s for workspaceId %s", uploadOutput.Location, wrkId)
errorJobs = append(errorJobs, ErrorJob{
jobs: jobsPerWorkspace[wrkId],
errorOutput: StoreErrorOutputT{
Expand Down

0 comments on commit 1d9320d

Please sign in to comment.