-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: redis persist * feat: improve snapshot * feat: improve snapshot * feat: improve snapshot * feat: improve snapshot * Merge branch 'master' into alg-queue-snapshot * feat: improve snapshot * Merge branch 'alg-queue-snapshot' of github.com:kube-HPC/hkube into alg-queue-snapshot * feat: add storage envs * feat: PR changes * feat: PR changes * feat: improve persistency * feat: queues snapshots * feat: queues snapshot * feat: queues snapshot * feat: queues snapshot * feat: queues snapshot * Merge branch 'master' into alg-queue-snapshot * Merge branch 'master' into alg-queue-snapshot * Merge branch 'master' into alg-queue-snapshot * Merge branch 'master' into alg-queue-snapshot
- Loading branch information
1 parent
b4012dc
commit 383394d
Showing
42 changed files
with
3,591 additions
and
1,363 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const log = require('@hkube/logger').GetLogFromContainer(); | ||
const queuesManager = require('./queues-manager'); | ||
const component = require('./consts/component-name').GRACEFUL_SHUTDOWN; | ||
|
||
class GracefulShutdown { | ||
async shutdown(cb) { | ||
try { | ||
log.info('starting graceful shutdown', { component }); | ||
await queuesManager.shutdown(); | ||
log.info('finish graceful shutdown', { component }); | ||
} | ||
catch (e) { | ||
log.error(`error in graceful shutdown ${e.message}`, { component }, e); | ||
} | ||
finally { | ||
cb(); | ||
} | ||
} | ||
} | ||
|
||
module.exports = new GracefulShutdown(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.