feat: Report cwctl events to hub (#8009)

This commit is contained in:
Vishnu Narayanan
2023-10-10 09:16:03 +05:30
committed by GitHub
parent b6ba0f343e
commit 8189dd932c
3 changed files with 71 additions and 3 deletions

View File

@@ -0,0 +1,8 @@
namespace :instance_id do
desc 'Get the installation identifier'
task :get_installation_identifier => :environment do
identifier = InstallationConfig.find_by(name: 'INSTALLATION_IDENTIFIER')&.value
identifier ||= InstallationConfig.create!(name: 'INSTALLATION_IDENTIFIER', value: SecureRandom.uuid).value
puts identifier
end
end