[Docker] Handle network errrors during seeding

Closes #629
This commit is contained in:
Earlopain 2024-04-05 13:24:58 +02:00
parent 584f69d407
commit 64259a0b4e
No known key found for this signature in database
GPG Key ID: 48860312319ADF61

View File

@ -83,6 +83,13 @@ end
unless Rails.env.test?
CurrentUser.user = admin
CurrentUser.ip_addr = "127.0.0.1"
import_posts
import_mascots
begin
import_posts
import_mascots
rescue StandardError => e
puts "--------"
puts "#{e.class}: #{e.message}"
puts "Failure during seeding, continuing on..."
puts "--------"
end
end