aboutsummaryrefslogtreecommitdiffstats
path: root/lib/MGA
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2014-08-03 18:22:44 +0100
committerColin Guthrie <colin@mageia.org>2014-08-03 19:12:59 +0100
commitaf119daf37015b8f8f787a6ac9b60e9bc666a4f3 (patch)
tree24e0fc80b5e51271f1e57372e4ea67b98d9b5bae /lib/MGA
parent84f3eaf41c30126ef87506f56ef9c1e5335d4864 (diff)
downloadmgaadvisories-af119daf37015b8f8f787a6ac9b60e9bc666a4f3.tar
mgaadvisories-af119daf37015b8f8f787a6ac9b60e9bc666a4f3.tar.gz
mgaadvisories-af119daf37015b8f8f787a6ac9b60e9bc666a4f3.tar.bz2
mgaadvisories-af119daf37015b8f8f787a6ac9b60e9bc666a4f3.tar.xz
mgaadvisories-af119daf37015b8f8f787a6ac9b60e9bc666a4f3.zip
Publish and Email advisories in order.
This should mean that emails are sent out in sequential order
Diffstat (limited to 'lib/MGA')
-rw-r--r--lib/MGA/Advisories.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/MGA/Advisories.pm b/lib/MGA/Advisories.pm
index 48038af..ac0aa9e 100644
--- a/lib/MGA/Advisories.pm
+++ b/lib/MGA/Advisories.pm
@@ -145,7 +145,7 @@ sub download_advisories {
sub publish_advisories {
my ($advdb) = @_;
- foreach my $adv (keys %{$advdb->{advisories}}) {
+ foreach my $adv (sort keys %{$advdb->{advisories}}) {
next if $advdb->{advisories}{$adv}{status}{published};
$advdb->{advisories}{$adv}{status}{published} =
$advdb->{advisories}{$adv}{pubtime} || time();
@@ -254,7 +254,7 @@ sub send_adv_mail {
ENCODING => 'utf8',
INCLUDE_PATH => $config->{tmpl_dir},
);
- foreach my $adv (keys %{$advdb->{advisories}}) {
+ foreach my $adv (sort keys %{$advdb->{advisories}}) {
next if $advdb->{advisories}{$adv}{no_mail};
next if $advdb->{advisories}{$adv}{no_save_status};
next if $advdb->{advisories}{$adv}{status}{mail_sent};