MM-54580: Fix panic in jobs/base_workers.go (#24631)
If GetJob fails, we would return a nil job and then try to log with that. To prevent this, we keep a reference to the old job and log with that in the error case. https://mattermost.atlassian.net/browse/MM-54580 ```release-note Fix a panic where a simple worker would crash if if failed to get a job. ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
ae1decd1a7
Коммит
b9c50641db
@@ -38,6 +38,7 @@ func makeJobServer(t *testing.T) (*JobServer, *storetest.Store, *mocks.MetricsIn
|
||||
ConfigService: configService,
|
||||
Store: mockStore,
|
||||
metrics: mockMetrics,
|
||||
logger: mlog.CreateConsoleTestLogger(t),
|
||||
}
|
||||
|
||||
return jobServer, mockStore, mockMetrics
|
||||
|
||||
Ссылка в новой задаче
Block a user