MM-53747: Do not start if job is in-progress as well. (#24115)

We missed this out last time. It's possible in an HA
scenario for a second pod to start later while the other
job is in-progress. In that case, it would schedule
two jobs.

https://mattermost.atlassian.net/browse/MM-53747

```release-note
NONE
```
Этот коммит содержится в:
Agniva De Sarker
2023-07-26 20:32:50 +05:30
коммит произвёл GitHub
родитель f10487c511
Коммит b47754e268
9 изменённых файлов: 247 добавлений и 6 удалений

Просмотреть файл

@@ -594,7 +594,7 @@ func (s *Server) doCloudS3PathMigrations() {
return
}
if _, appErr := s.Jobs.CreateJob(model.JobTypeS3PathMigration, nil); appErr != nil {
if _, appErr := s.Jobs.CreateJobOnce(model.JobTypeS3PathMigration, nil); appErr != nil {
mlog.Fatal("failed to start job for migrating s3 file paths", mlog.Err(appErr))
return
}