Skip to content

Commit e8d3f50

Browse files
committed
Make health checks before reloading page
1 parent ca3b739 commit e8d3f50

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

admin/src/components/Collections.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,15 +137,14 @@ const Collections = ({ updateCredentials }) => {
137137

138138
const reload = async () => {
139139
try {
140-
strapi.lockApp()
140+
strapi.lockApp({ enabled: true })
141141
const { error, ...res } = await request(`/${pluginId}/reload`, {
142142
method: 'GET'
143-
})
143+
}, true)
144144
if (error) {
145145
errorNotifications(res)
146146
strapi.unlockApp()
147147
} else {
148-
// Reload the app if autoReload is set
149148
window.location.reload()
150149
}
151150
} catch (err) {

controllers/meilisearch.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ async function reload (ctx) {
147147
const {
148148
config: { autoReload }
149149
} = strapi
150-
console.log(autoReload, !autoReload)
151150
if (!autoReload) {
152151
return {
153152
message: 'autoReload is set to false. Please reload server manually.',

0 commit comments

Comments
 (0)