Fixed a bug in anvil-manage-files where missing files weren't being downloaded.

Signed-off-by: digimer <mkelly@alteeve.ca>
main
digimer 1 year ago
parent 7545df1e55
commit b3c067b016
  1. 2
      Anvil/Tools/Database.pm
  2. 2
      Anvil/Tools/Storage.pm
  3. 14
      tools/anvil-manage-files
  4. 2
      tools/striker-file-manager

@ -3580,7 +3580,7 @@ FROM
}});
}
# If this host is a node in an Anvil!, set the old 'file_location_anvil_uuid' to maintain
# If this host is an Anvil! subnode, set the old 'file_location_anvil_uuid' to maintain
# backwards compatibility.
if ((exists $anvil->data->{hosts}{host_uuid}{$file_location_host_uuid}) &&
($anvil->data->{hosts}{host_uuid}{$file_location_host_uuid}{anvil_uuid}))

@ -776,7 +776,7 @@ sub check_files
}
elsif ($file_location_ready)
{
# File doesn't exist but is marked as read, mark it as not ready.
# File doesn't exist but is marked as ready, mark it as not ready.
$anvil->Database->insert_or_update_file_locations({
debug => $debug,
file_location_uuid => $file_location_uuid,

@ -175,6 +175,9 @@ sub find_missing_files
# What am I? This will impact how missing files are found.
$anvil->Database->get_anvils();
my $host_uuid = $anvil->Get->host_uuid();
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { host_uuid => $host_uuid }});
my $query = "
SELECT
file_uuid,
@ -237,16 +240,7 @@ ORDER BY
else
{
# Check to see if we're supposed to have this file.
$anvil->Database->get_file_locations();
my $anvil_uuid = $anvil->Cluster->get_anvil_uuid();
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { anvil_uuid => $anvil_uuid }});
# Nothing to do if we're not in an Anvil! yet.
next if not $anvil_uuid;
# Do we have a file_location_uuid? If not, there will be soon but nothing to do until
# then.
my $file_location_uuid = $anvil->data->{anvils}{anvil_uuid}{$anvil_uuid}{file_uuid}{$file_uuid}{file_location_uuid};
my $file_location_uuid = $anvil->data->{file_locations}{host_uuid}{$host_uuid}{file_uuid}{$file_uuid}{file_location_uuid};
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { file_location_uuid => $file_location_uuid }});
next if not $file_location_uuid;

@ -3,6 +3,8 @@
# This is the command line user interface for managing files on /mnt/shared/files on Strikers and made
# available on Anvil! systems.
#
# NOTE: This program is incomplete!
#
use strict;
use warnings;

Loading…
Cancel
Save