fix(services): stop auto-update monitoring during shutdown
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
# Changelog
|
||||
|
||||
## 2026-03-16 - 1.14.10 - fix(services)
|
||||
stop auto-update monitoring during shutdown
|
||||
|
||||
- Track the auto-update polling interval in the services manager
|
||||
- Clear the auto-update interval when Onebox shuts down to prevent background checks after shutdown
|
||||
|
||||
## 2026-03-16 - 1.14.9 - fix(repo)
|
||||
no changes to commit
|
||||
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@serve.zone/onebox',
|
||||
version: '1.14.9',
|
||||
version: '1.14.10',
|
||||
description: 'Self-hosted container platform with automatic SSL and DNS - a mini Heroku for single servers'
|
||||
}
|
||||
|
||||
@@ -411,6 +411,9 @@ export class Onebox {
|
||||
try {
|
||||
logger.info('Shutting down Onebox...');
|
||||
|
||||
// Stop auto-update monitoring
|
||||
this.services.stopAutoUpdateMonitoring();
|
||||
|
||||
// Stop backup scheduler
|
||||
await this.backupScheduler.stop();
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ export class OneboxServicesManager {
|
||||
private oneboxRef: any; // Will be Onebox instance
|
||||
private database: OneboxDatabase;
|
||||
private docker: OneboxDockerManager;
|
||||
private autoUpdateIntervalId: number | null = null;
|
||||
|
||||
constructor(oneboxRef: any) {
|
||||
this.oneboxRef = oneboxRef;
|
||||
@@ -681,7 +682,7 @@ export class OneboxServicesManager {
|
||||
*/
|
||||
startAutoUpdateMonitoring(): void {
|
||||
// Check every 30 seconds
|
||||
setInterval(async () => {
|
||||
this.autoUpdateIntervalId = setInterval(async () => {
|
||||
try {
|
||||
await this.checkForRegistryUpdates();
|
||||
} catch (error) {
|
||||
@@ -692,6 +693,17 @@ export class OneboxServicesManager {
|
||||
logger.info('Auto-update monitoring started (30s interval)');
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop auto-update monitoring
|
||||
*/
|
||||
stopAutoUpdateMonitoring(): void {
|
||||
if (this.autoUpdateIntervalId !== null) {
|
||||
clearInterval(this.autoUpdateIntervalId);
|
||||
this.autoUpdateIntervalId = null;
|
||||
logger.debug('Auto-update monitoring stopped');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check all services using onebox registry for updates
|
||||
*/
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@serve.zone/onebox',
|
||||
version: '1.14.9',
|
||||
version: '1.14.10',
|
||||
description: 'Self-hosted container platform with automatic SSL and DNS - a mini Heroku for single servers'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user