mirror of
https://github.com/internetee/registry.git
synced 2025-07-01 16:53:37 +02:00
Output to stdout for cron log
This commit is contained in:
parent
4f706d7100
commit
8b05f5df0b
1 changed files with 2 additions and 2 deletions
|
@ -11,7 +11,7 @@ class ZonefileSetting < ActiveRecord::Base
|
||||||
def self.generate_zonefile(origin)
|
def self.generate_zonefile(origin)
|
||||||
filename = "#{origin}.zone"
|
filename = "#{origin}.zone"
|
||||||
|
|
||||||
logger.info("-----> Generating zonefile #{filename}")
|
STDOUT << "-----> Generating zonefile #{filename}"
|
||||||
|
|
||||||
zf = ActiveRecord::Base.connection.execute(
|
zf = ActiveRecord::Base.connection.execute(
|
||||||
"select generate_zonefile('#{origin}')"
|
"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) }
|
File.open("#{APP_CONFIG['zonefile_export_dir']}/#{filename}", 'w') { |f| f.write(zf) }
|
||||||
|
|
||||||
logger.info("-----> Successfully generated zonefile #{filename}")
|
STDOUT << "-----> Successfully generated zonefile #{filename}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_s
|
def to_s
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue