mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 09:57:23 +02:00
Log time to stdout as well
This commit is contained in:
parent
8b05f5df0b
commit
f74e6cd3a3
1 changed files with 2 additions and 2 deletions
|
@ -11,7 +11,7 @@ class ZonefileSetting < ActiveRecord::Base
|
|||
def self.generate_zonefile(origin)
|
||||
filename = "#{origin}.zone"
|
||||
|
||||
STDOUT << "-----> Generating zonefile #{filename}"
|
||||
STDOUT << "#{Time.now.utc} - Generating zonefile #{filename}\n"
|
||||
|
||||
zf = ActiveRecord::Base.connection.execute(
|
||||
"select generate_zonefile('#{origin}')"
|
||||
|
@ -19,7 +19,7 @@ class ZonefileSetting < ActiveRecord::Base
|
|||
|
||||
File.open("#{APP_CONFIG['zonefile_export_dir']}/#{filename}", 'w') { |f| f.write(zf) }
|
||||
|
||||
STDOUT << "-----> Successfully generated zonefile #{filename}"
|
||||
STDOUT << "#{Time.now.utc} - Successfully generated zonefile #{filename}\n"
|
||||
end
|
||||
|
||||
def to_s
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue