Skip to content

Commit

Permalink
Merge pull request #1126 from PlanoramaEvents/change-503-to-307
Browse files Browse the repository at this point in the history
PLAN-1034 use 307 so to be less mis-leading for monitor
  • Loading branch information
balen authored Jul 16, 2024
2 parents d53354b + fa6207f commit a0c9279
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ def application_time_zone(&block)

def check_up
if ScheduleSnapshot.where("status = 'in_progress'").count > 0
redirect_to '/maintenance.html', status: 503
redirect_to '/maintenance.html', status: 307
end
# Stop people from making changes if we are running any long job
if JobStatus.where("status = 'inprogress'").count > 0
redirect_to '/maintenance.html', status: 503
redirect_to '/maintenance.html', status: 307
end
end

Expand Down
4 changes: 2 additions & 2 deletions app/javascript/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ export const http = axios.create({})

http.interceptors.response.use(
response => {
if (response.status == 503) {
if (response.status == 503 || response.status == 307) {
window.location = "/maintenance.html"
}
return response;
},
error => {
if (error.response && error.response.status == 503) {
if (error.response && (error.response.status == 503 || response.status == 307)) {
window.location = "/maintenance.html"
}

Expand Down

0 comments on commit a0c9279

Please sign in to comment.