mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 10:45:58 +02:00
tostdout
This commit is contained in:
parent
00eca4df5e
commit
718249971f
1 changed files with 8 additions and 4 deletions
|
@ -132,12 +132,16 @@ class Certificate < ApplicationRecord
|
|||
end
|
||||
|
||||
class << self
|
||||
|
||||
def tostdout(message)
|
||||
time = Time.zone.now.utc
|
||||
STDOUT << "#{time} - #{message}\n" unless Rails.env.test?
|
||||
end
|
||||
def update_crl
|
||||
start = "#{Time.zone.now.utc} - Running crlupdater\n"
|
||||
stop = "#{Time.zone.now.utc} - Finished running crlupdater\n"
|
||||
STDOUT << start unless Rails.env.test?
|
||||
|
||||
tostdout('Running crlupdater')
|
||||
system('/bin/bash', ENV['crl_updater_path'].to_s)
|
||||
STDOUT << stop unless Rails.env.test?
|
||||
tostdout('Finished running crlupdater')
|
||||
end
|
||||
|
||||
def parse_md_from_string(crt)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue