mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 18:56:05 +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
|
end
|
||||||
|
|
||||||
class << self
|
class << self
|
||||||
|
|
||||||
|
def tostdout(message)
|
||||||
|
time = Time.zone.now.utc
|
||||||
|
STDOUT << "#{time} - #{message}\n" unless Rails.env.test?
|
||||||
|
end
|
||||||
def update_crl
|
def update_crl
|
||||||
start = "#{Time.zone.now.utc} - Running crlupdater\n"
|
|
||||||
stop = "#{Time.zone.now.utc} - Finished running crlupdater\n"
|
tostdout('Running crlupdater')
|
||||||
STDOUT << start unless Rails.env.test?
|
|
||||||
system('/bin/bash', ENV['crl_updater_path'].to_s)
|
system('/bin/bash', ENV['crl_updater_path'].to_s)
|
||||||
STDOUT << stop unless Rails.env.test?
|
tostdout('Finished running crlupdater')
|
||||||
end
|
end
|
||||||
|
|
||||||
def parse_md_from_string(crt)
|
def parse_md_from_string(crt)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue