feat: new manual update process + remove next_channel
This commit is contained in:
@@ -98,47 +98,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
function revive() {
|
||||
if (checkHealthInterval) return true;
|
||||
console.log('Checking server\'s health...')
|
||||
checkHealthInterval = setInterval(() => {
|
||||
fetch('/api/health')
|
||||
.then(response => {
|
||||
if (response.ok) {
|
||||
window.toast('Coolify is back online. Reloading...', {
|
||||
type: 'success',
|
||||
})
|
||||
if (checkHealthInterval) clearInterval(checkHealthInterval);
|
||||
setTimeout(() => {
|
||||
window.location.reload();
|
||||
}, 5000)
|
||||
} else {
|
||||
console.log('Waiting for server to come back from dead...');
|
||||
}
|
||||
})
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
function upgrade() {
|
||||
if (checkIfIamDeadInterval) return true;
|
||||
console.log('Update initiated.')
|
||||
checkIfIamDeadInterval = setInterval(() => {
|
||||
fetch('/api/health')
|
||||
.then(response => {
|
||||
if (response.ok) {
|
||||
console.log('It\'s alive. Waiting for server to be dead...');
|
||||
} else {
|
||||
window.toast('Update done, restarting Coolify!', {
|
||||
type: 'success',
|
||||
})
|
||||
console.log('It\'s dead. Reviving... Standby... Bzz... Bzz...')
|
||||
if (checkIfIamDeadInterval) clearInterval(checkIfIamDeadInterval);
|
||||
revive();
|
||||
}
|
||||
})
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
function copyToClipboard(text) {
|
||||
navigator?.clipboard?.writeText(text) && window.Livewire.dispatch('success', 'Copied to clipboard.');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user