Skip to content

Commit 4fcfa4a

Browse files
committed
fix(engine): do not panic reporting an empty activity (#438)
1 parent 56ac559 commit 4fcfa4a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

engine/internal/retrieval/engine/postgres/physical/physical.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ func (r *RestoreJob) Reload(cfg map[string]interface{}) (err error) {
165165

166166
// ReportActivity reports the current job activity.
167167
func (r *RestoreJob) ReportActivity(_ context.Context) (*activity.Activity, error) {
168-
return nil, nil
168+
return &activity.Activity{}, nil
169169
}
170170

171171
// Run starts the job.

engine/internal/retrieval/engine/postgres/snapshot/logical.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ func (s *LogicalInitial) Reload(cfg map[string]interface{}) (err error) {
116116

117117
// ReportActivity reports the current job activity.
118118
func (s *LogicalInitial) ReportActivity(_ context.Context) (*activity.Activity, error) {
119-
return nil, nil
119+
return &activity.Activity{}, nil
120120
}
121121

122122
// Run starts the job.

engine/internal/retrieval/engine/postgres/snapshot/physical.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ func (p *PhysicalInitial) reloadScheduler() {
281281

282282
// ReportActivity reports the current job activity.
283283
func (p *PhysicalInitial) ReportActivity(_ context.Context) (*activity.Activity, error) {
284-
return nil, nil
284+
return &activity.Activity{}, nil
285285
}
286286

287287
// Run starts the job.

0 commit comments

Comments
 (0)