1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-19 13:54:25 +01:00

FORCE_VERSION_CHECK for dev env + do not save hub public key if duplicate

This commit is contained in:
Sylvain 2020-01-14 17:59:30 +01:00
parent 133fe5c379
commit 774060d9ab
3 changed files with 9 additions and 0 deletions

View File

@ -21,6 +21,8 @@ class VersionCheckWorker
setting_ver.save!
setting_key = Setting.find_or_initialize_by(name: 'hub_public_key')
return if setting_key.value == res['key']
setting_key.value = res['key']
setting_key.save!
end

View File

@ -243,6 +243,11 @@ By default, theses variables are not present in application.yml because they are
Optional email of the administrator account in charge of the system administration.
If specified, it will be hidden from the administrators list and it will exclusively receive the notifications related to the system administration.
If not specified, every admins will receive system administration notifications.
<a name="FORCE_VERSION_CHECK"></a>
FORCE_VERSION_CHECK
In test and development environments, the version won't be check automatically, unless this variable is set to "true".
<a name="internationalization-settings"></a>
## Internationalization setting.

View File

@ -16,6 +16,8 @@ class Version
end
def self.check_and_schedule
return if Rails.env.development? && !ENV['FORCE_VERSION_CHECK']
VersionCheckWorker.perform_async
# every sunday at 1:15am
m = DateTime.current.minute