* Fixed a bug in anvil-daemon where a stray 'die' from earlier work was left in.

* Fixed a bug where a double-equal in anvil-configure-striker was causing it not to compile and run.

Signed-off-by: Digimer <digimer@alteeve.ca>
main
Digimer 6 years ago
parent d3d28d8ec5
commit e15fd19ee4
  1. 3
      notes
  2. 7
      tools/anvil-configure-striker
  3. 6
      tools/anvil-daemon
  4. 4
      tools/anvil-maintenance-mode

@ -1,6 +1,3 @@
What if I simply add a flag to Database->write to refresh 'sys::database::timestamp' and not round it?
Then things like 'update_job' could ask for the date to be updated and keep all the records unique?
DB stuff; DB stuff;
Dump; Dump;

@ -192,8 +192,11 @@ sub reconfigure_network
}}); }});
# Set the hostname # Set the hostname
my ($hostname, $descriptive_hostname) = = $anvil->System->hostname({set => $new_hostname, pretty => $pretty_hostname, debug => 3}); my ($hostname, $descriptive_hostname) = $anvil->System->hostname({set => $new_hostname, pretty => $pretty_hostname, debug => 3});
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { hostname => $hostname }}); $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => {
hostname => $hostname,
descriptive_hostname => $descriptive_hostname,
}});
if ($hostname eq $new_hostname) if ($hostname eq $new_hostname)
{ {
# Success # Success

@ -489,8 +489,8 @@ sub run_jobs
# Start the job, appending '--job-uuid' to the command. # Start the job, appending '--job-uuid' to the command.
my $command = $job_command." --job-uuid ".$job_uuid; my $command = $job_command." --job-uuid ".$job_uuid;
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 1, secure => 0, key => "log_0210", variables => { command => $command }}); $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 1, secure => 0, key => "log_0210", variables => { command => $command }});
die;
$anvil->data->{jobs}{handles}{$job_uuid} = $anvil->System->call({ $anvil->data->{jobs}{handles}{$job_uuid} = $anvil->System->call({
debug => 3,
background => 1, background => 1,
stdout_file => "/tmp/anvil.job.".$job_uuid.".stdout", stdout_file => "/tmp/anvil.job.".$job_uuid.".stdout",
stderr_file => "/tmp/anvil.job.".$job_uuid.".stderr", stderr_file => "/tmp/anvil.job.".$job_uuid.".stderr",
@ -498,11 +498,11 @@ sub run_jobs
source => $THIS_FILE, source => $THIS_FILE,
line => __LINE__, line => __LINE__,
}); });
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { "jobs::handles::${job_uuid}" => $anvil->data->{jobs}{handles}{$job_uuid} }}); $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { "jobs::handles::${job_uuid}" => $anvil->data->{jobs}{handles}{$job_uuid} }});
# Log the PID (the job should update the database). # Log the PID (the job should update the database).
my $pid = $anvil->data->{jobs}{handles}{$job_uuid}->pid(); my $pid = $anvil->data->{jobs}{handles}{$job_uuid}->pid();
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { pid => $pid }}); $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { pid => $pid }});
} }
} }

@ -45,9 +45,9 @@ if (not $anvil->data->{sys}{database}{connections})
} }
my $maintenance_mode = $anvil->System->maintenance_mode({debug => 3}); my $maintenance_mode = $anvil->System->maintenance_mode({debug => 3});
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { maintenance_mode => $maintenance_mode }}); $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { maintenance_mode => $maintenance_mode }});
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { "switches::set" => $anvil->data->{switches}{set} }}); $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { "switches::set" => $anvil->data->{switches}{set} }});
if ($anvil->data->{switches}{set} eq "1") if ($anvil->data->{switches}{set} eq "1")
{ {
# Enable # Enable

Loading…
Cancel
Save