mirror of
https://github.com/neocities/neocities.git
synced 2025-08-03 16:21:52 +02:00
unpin code for pruning excessive ipfs archives
This commit is contained in:
parent
7cce210f90
commit
8aa0061ab4
3 changed files with 32 additions and 1 deletions
|
@ -641,6 +641,12 @@ class Site < Sequel::Model
|
|||
output_array.last.split(' ')[1]
|
||||
end
|
||||
|
||||
def purge_old_archives
|
||||
archives_dataset.order(:updated_at).offset(Archive::MAXIMUM_ARCHIVES_PER_SITE).all.each do |archive|
|
||||
archive.destroy
|
||||
end
|
||||
end
|
||||
|
||||
def archive!
|
||||
#if ENV["RACK_ENV"] == 'test'
|
||||
# ipfs_hash = "QmcKi2ae3uGb1kBg1yBpsuwoVqfmcByNdMiZ2pukxyLWD8"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue