fix(core): Allow license:clear command to be used for licenses that failed renewal (#10665)
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <netroy@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
3ea114129b
commit
a422c5ac7b
@@ -12,10 +12,14 @@ export class ClearLicenseCommand extends BaseCommand {
|
||||
async run() {
|
||||
this.logger.info('Clearing license from database.');
|
||||
|
||||
// Invoke shutdown() to force any floating entitlements to be released
|
||||
// Attempt to invoke shutdown() to force any floating entitlements to be released
|
||||
const license = Container.get(License);
|
||||
await license.init();
|
||||
await license.shutdown();
|
||||
try {
|
||||
await license.shutdown();
|
||||
} catch {
|
||||
this.logger.info('License shutdown failed. Continuing with clearing license from database.');
|
||||
}
|
||||
|
||||
await Container.get(SettingsRepository).delete({
|
||||
key: SETTINGS_LICENSE_CERT_KEY,
|
||||
|
||||
Reference in New Issue
Block a user