🐛 — Trying to fix the provisioning task

This commit is contained in:
Luc Didry 2020-07-19 18:02:05 +02:00
parent 5e2dd60cf2
commit 222fe59ebc
No known key found for this signature in database
GPG Key ID: EA868E12D0257E3C
4 changed files with 39 additions and 29 deletions

View File

@ -2,6 +2,7 @@ Revision history for Lufi
?.??.? ????-??-??
- 🔥 Remove code from abandonned feature
- Trying to fix the provisioning task
0.05.1 2020-06-30
- Update german translation

View File

@ -78,7 +78,16 @@ sub startup {
my $loop = shift;
my $lockfile = Mojo::File->new($ENV{MOJO_CONFIG})->basename('.conf').'-provisioning.lock';
return if -e $lockfile;
if (-e $lockfile) {
my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks) = stat($lockfile);
# Remove the lockfile if more than 20 seconds old
if (time - $mtime > 20) {
unlink $lockfile if -e $lockfile; # if -e just to be sure the file hasnt been removed while checking it
} else {
return;
}
}
$lockfile = Mojo::File->new($lockfile)->touch();

View File

@ -138,15 +138,15 @@ msgstr "Copy all links to clipboard"
msgid "Copy to clipboard"
msgstr "Copy to clipboard"
#: lib/Lufi/Controller/Files.pm:502
#: lib/Lufi/Controller/Files.pm:501
msgid "Could not delete the file. You are not authenticated."
msgstr "Could not delete the file. You are not authenticated."
#: lib/Lufi/Controller/Files.pm:484
#: lib/Lufi/Controller/Files.pm:483
msgid "Could not find the file. Are you sure of the URL and the token?"
msgstr "Could not find the file. Are you sure of the URL and the token?"
#: lib/Lufi/Controller/Files.pm:395
#: lib/Lufi/Controller/Files.pm:394
msgid "Could not find the file. Are you sure of the URL?"
msgstr "Could not find the file. Are you sure of the URL?"
@ -222,15 +222,15 @@ msgstr "Emails"
msgid "Encrypting part XX1 of XX2"
msgstr "Encrypting part XX1 of XX2"
#: lib/Lufi/Controller/Files.pm:284
#: lib/Lufi/Controller/Files.pm:283
msgid "Error: the file existed but was deleted."
msgstr "Error: the file existed but was deleted."
#: lib/Lufi/Controller/Files.pm:364
#: lib/Lufi/Controller/Files.pm:363
msgid "Error: the file has not been sent entirely."
msgstr "Error: the file has not been sent entirely."
#: lib/Lufi/Controller/Files.pm:374
#: lib/Lufi/Controller/Files.pm:373
msgid "Error: unable to find the file. Are you sure of your URL?"
msgstr "Error: unable to find the file. Are you sure of your URL?"
@ -250,7 +250,7 @@ msgstr "Expires at"
msgid "Export localStorage data"
msgstr "Export localStorage data"
#: lib/Lufi/Controller/Files.pm:466
#: lib/Lufi/Controller/Files.pm:465
msgid "File deleted"
msgstr "File deleted"
@ -585,7 +585,7 @@ msgstr "The email subject can't be empty."
msgid "The expiration delay (%1) is not between 1 and %2 days."
msgstr "The expiration delay (%1) is not between 1 and %2 days."
#: lib/Lufi/Controller/Files.pm:463
#: lib/Lufi/Controller/Files.pm:462
msgid "The file has already been deleted"
msgstr "The file has already been deleted"
@ -640,11 +640,11 @@ msgstr "The mail has been sent."
msgid "The original (and only for now) author is <a href=\"https://fiat-tux.fr\" class=\"classic\">Luc Didry</a>."
msgstr "The original (and only for now) author is <a href=\"https://fiat-tux.fr\" class=\"classic\">Luc Didry</a>."
#: lib/Lufi/Controller/Files.pm:231
#: lib/Lufi/Controller/Files.pm:230
msgid "The server was unable to find the file record to add your file part to. Please, contact the administrator."
msgstr "The server was unable to find the file record to add your file part to. Please, contact the administrator."
#: lib/Lufi/Controller/Files.pm:290
#: lib/Lufi/Controller/Files.pm:289
msgid "This file has been deactivated by the admins. Contact them to know why."
msgstr "This file has been deactivated by the admins. Contact them to know why."
@ -674,17 +674,17 @@ msgid "Unable to copy the link(s) to your clipboard"
msgstr "Unable to copy the link(s) to your clipboard"
#. ($short)
#: lib/Lufi/Controller/Files.pm:434
#: lib/Lufi/Controller/Files.pm:433
msgid "Unable to get counter for %1. The file does not exists. It will be removed from your localStorage."
msgstr "Unable to get counter for %1. The file does not exists. It will be removed from your localStorage."
#. ($short)
#: lib/Lufi/Controller/Files.pm:424
#: lib/Lufi/Controller/Files.pm:423
msgid "Unable to get counter for %1. The token is invalid."
msgstr "Unable to get counter for %1. The token is invalid."
#. ($short)
#: lib/Lufi/Controller/Files.pm:444
#: lib/Lufi/Controller/Files.pm:443
msgid "Unable to get counter for %1. You are not authenticated."
msgstr "Unable to get counter for %1. You are not authenticated."
@ -769,7 +769,7 @@ msgstr "Your browser does not have enough entropy to generate a strong encryptio
msgid "Your file is too big: %1 (maximum size allowed: %2)"
msgstr "Your file is too big: %1 (maximum size allowed: %2)"
#: lib/Lufi/Controller/Files.pm:346
#: lib/Lufi/Controller/Files.pm:345
msgid "Your password is not valid. Please refresh the page to retry."
msgstr "Your password is not valid. Please refresh the page to retry."

View File

@ -138,15 +138,15 @@ msgstr ""
msgid "Copy to clipboard"
msgstr ""
#: lib/Lufi/Controller/Files.pm:502
#: lib/Lufi/Controller/Files.pm:501
msgid "Could not delete the file. You are not authenticated."
msgstr ""
#: lib/Lufi/Controller/Files.pm:484
#: lib/Lufi/Controller/Files.pm:483
msgid "Could not find the file. Are you sure of the URL and the token?"
msgstr ""
#: lib/Lufi/Controller/Files.pm:395
#: lib/Lufi/Controller/Files.pm:394
msgid "Could not find the file. Are you sure of the URL?"
msgstr ""
@ -222,15 +222,15 @@ msgstr ""
msgid "Encrypting part XX1 of XX2"
msgstr ""
#: lib/Lufi/Controller/Files.pm:284
#: lib/Lufi/Controller/Files.pm:283
msgid "Error: the file existed but was deleted."
msgstr ""
#: lib/Lufi/Controller/Files.pm:364
#: lib/Lufi/Controller/Files.pm:363
msgid "Error: the file has not been sent entirely."
msgstr ""
#: lib/Lufi/Controller/Files.pm:374
#: lib/Lufi/Controller/Files.pm:373
msgid "Error: unable to find the file. Are you sure of your URL?"
msgstr ""
@ -250,7 +250,7 @@ msgstr ""
msgid "Export localStorage data"
msgstr ""
#: lib/Lufi/Controller/Files.pm:466
#: lib/Lufi/Controller/Files.pm:465
msgid "File deleted"
msgstr ""
@ -585,7 +585,7 @@ msgstr ""
msgid "The expiration delay (%1) is not between 1 and %2 days."
msgstr ""
#: lib/Lufi/Controller/Files.pm:463
#: lib/Lufi/Controller/Files.pm:462
msgid "The file has already been deleted"
msgstr ""
@ -640,11 +640,11 @@ msgstr ""
msgid "The original (and only for now) author is <a href=\"https://fiat-tux.fr\" class=\"classic\">Luc Didry</a>."
msgstr ""
#: lib/Lufi/Controller/Files.pm:231
#: lib/Lufi/Controller/Files.pm:230
msgid "The server was unable to find the file record to add your file part to. Please, contact the administrator."
msgstr ""
#: lib/Lufi/Controller/Files.pm:290
#: lib/Lufi/Controller/Files.pm:289
msgid "This file has been deactivated by the admins. Contact them to know why."
msgstr ""
@ -674,17 +674,17 @@ msgid "Unable to copy the link(s) to your clipboard"
msgstr ""
#. ($short)
#: lib/Lufi/Controller/Files.pm:434
#: lib/Lufi/Controller/Files.pm:433
msgid "Unable to get counter for %1. The file does not exists. It will be removed from your localStorage."
msgstr ""
#. ($short)
#: lib/Lufi/Controller/Files.pm:424
#: lib/Lufi/Controller/Files.pm:423
msgid "Unable to get counter for %1. The token is invalid."
msgstr ""
#. ($short)
#: lib/Lufi/Controller/Files.pm:444
#: lib/Lufi/Controller/Files.pm:443
msgid "Unable to get counter for %1. You are not authenticated."
msgstr ""
@ -769,7 +769,7 @@ msgstr ""
msgid "Your file is too big: %1 (maximum size allowed: %2)"
msgstr ""
#: lib/Lufi/Controller/Files.pm:346
#: lib/Lufi/Controller/Files.pm:345
msgid "Your password is not valid. Please refresh the page to retry."
msgstr ""