mirror of
https://github.com/neocities/neocities.git
synced 2025-06-18 10:24:37 +02:00
enforce maximum archives
This commit is contained in:
parent
ac0afbd2e9
commit
93e81e9d00
1 changed files with 5 additions and 0 deletions
|
@ -624,6 +624,11 @@ class Site < Sequel::Model
|
||||||
|
|
||||||
def add_to_ipfs
|
def add_to_ipfs
|
||||||
# Not ideal. An SoA version is in progress.
|
# Not ideal. An SoA version is in progress.
|
||||||
|
|
||||||
|
if archives_dataset.count > Archive::MAXIMUM_ARCHIVES_PER_SITE
|
||||||
|
archives_dataset.order(:updated_at).first.destroy
|
||||||
|
end
|
||||||
|
|
||||||
if $config['ipfs_ssh_host'] && $config['ipfs_ssh_user']
|
if $config['ipfs_ssh_host'] && $config['ipfs_ssh_user']
|
||||||
rbox = Rye::Box.new $config['ipfs_ssh_host'], :user => $config['ipfs_ssh_user']
|
rbox = Rye::Box.new $config['ipfs_ssh_host'], :user => $config['ipfs_ssh_user']
|
||||||
begin
|
begin
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue