diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2023-05-11 16:52:41 +0200 |
|---|---|---|
| committer | Aleksandr Nogikh <wp32pw@gmail.com> | 2023-05-12 13:03:07 +0200 |
| commit | 46a1430596ca4a4bbd2ac268b35da24938a66094 (patch) | |
| tree | 9a812d92230045e47f17ce9efd991b8860d0be27 /dashboard/app/reporting.go | |
| parent | adb9a3cd3732374cec4a7914bb6db944c1b16ef2 (diff) | |
dashboard: refactor currentReporting invocations
The method doesn't need context.Context.
Diffstat (limited to 'dashboard/app/reporting.go')
| -rw-r--r-- | dashboard/app/reporting.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dashboard/app/reporting.go b/dashboard/app/reporting.go index b1a44e7f4..6f30b6216 100644 --- a/dashboard/app/reporting.go +++ b/dashboard/app/reporting.go @@ -95,7 +95,7 @@ func handleReportBug(c context.Context, typ string, state *ReportingState, bug * func needReport(c context.Context, typ string, state *ReportingState, bug *Bug) ( reporting *Reporting, bugReporting *BugReporting, reportingIdx int, status, link string, err error) { - reporting, bugReporting, reportingIdx, status, err = currentReporting(c, bug) + reporting, bugReporting, reportingIdx, status, err = currentReporting(bug) if err != nil || reporting == nil { return } @@ -186,7 +186,7 @@ func reportingPollNotifications(c context.Context, typ string) []*dashapi.BugNot } func handleReportNotif(c context.Context, typ string, bug *Bug) (*dashapi.BugNotification, error) { - reporting, bugReporting, _, _, err := currentReporting(c, bug) + reporting, bugReporting, _, _, err := currentReporting(bug) if err != nil || reporting == nil { return nil, nil } @@ -339,7 +339,7 @@ func createNotification(c context.Context, typ dashapi.BugNotif, public bool, te return notif, nil } -func currentReporting(c context.Context, bug *Bug) (*Reporting, *BugReporting, int, string, error) { +func currentReporting(bug *Bug) (*Reporting, *BugReporting, int, string, error) { if bug.NumCrashes == 0 { // This is possible during the short window when we already created a bug, // but did not attach the first crash to it yet. We need to avoid reporting this bug yet @@ -1331,7 +1331,7 @@ func loadFullBugInfo(c context.Context, bug *Bug, bugKey *db.Key, return nil, err } for _, similarBug := range similar { - _, bugReporting, _, _, _ := currentReporting(c, similarBug) + _, bugReporting, _, _, _ := currentReporting(similarBug) if bugReporting == nil { continue } |
