🔧 — Mark Swift as experimental + improve copyFilesToSwift command

This commit is contained in:
Luc Didry 2020-06-02 21:17:11 +02:00
parent ed302d5a4b
commit 0b2ad4a66e
No known key found for this signature in database
GPG Key ID: EA868E12D0257E3C
4 changed files with 11 additions and 1 deletions

View File

@ -5,7 +5,7 @@ Revision history for Lufi
- Use Weblate instead of Zanata for translations (https://weblate.framasoft.org/projects/lufi/development/)
- Add config API endpoint (#183)
- Show latest tag and commit of the instance in about page and config API endpoint (#174)
- Add support for Swift object storage
- Add support for Swift object storage (EXPERIMENTAL)
0.04.6 2019-11-07
- Now can send large files (>2Gio) while using a DB other than SQLite (#165)

View File

@ -69,6 +69,7 @@ sub startup {
# Now helpers has been loaded, time to check Swift container
if ($config->{swift}) {
$self->check_swift_container();
$self->log->info('EXPERIMENTAL Using Swift object storage');
}
# Recurrent task

View File

@ -13,6 +13,10 @@ sub run {
$c->app->check_swift_container();
my @dirs = glob(File::Spec->catdir($c->app->config('upload_dir'), '*'));
unless (scalar(@dirs)) {
say sprintf('The configured upload_dir (%s) seems to be empty. Is `upload_dir` configured in lufi.conf?', $c->app->config('upload_dir'));
exit 1;
}
say sprintf('%d folders to upload to Swift (can\'t say how many files, or the total size, sorry). This can take some time.', scalar(@dirs));
print 'Do you want to continue? [Y/n] ';
my $confirm = <STDIN>;

View File

@ -107,9 +107,14 @@
# optional, default is 'files'
#upload_dir => 'files',
#!!!!!!!!!!!!!!!
# EXPERIMENTAL !
#!!!!!!!!!!!!!!!
# You can store files on Swift object storage (https://en.wikipedia.org/wiki/OpenStack#Swift) instead of filesystem
# Please read https://metacpan.org/pod/Net::OpenStack::Swift#SYNOPSIS to know how to configure this setting
# IMPORTANT: add a `container` key in it, to let Lufi know which container to use. This is not a regular Net::OpenStack::Swift setting, but Lufi need it.
# EXPERIMENTAL: if the upload or download of files are stucked, reload Lufi and create a cron task to reload Lufi once a day
# You can copy Lufi files to Swift object storage by launching the command `carton exec script/lufi copyFilesToSwift` (can take a long time)
# optional, no default
#swift => {
# auth_url => 'https://auth-endpoint-url/v2.0',