[Rt-commit] r8227 - rtir/branches/2.3-EXPERIMENTAL/etc
ruz at bestpractical.com
ruz at bestpractical.com
Thu Jul 19 13:32:36 EDT 2007
Author: ruz
Date: Thu Jul 19 13:32:35 2007
New Revision: 8227
Modified:
rtir/branches/2.3-EXPERIMENTAL/etc/add_constituency
Log:
* add load_queue as we want add addresses updater
Modified: rtir/branches/2.3-EXPERIMENTAL/etc/add_constituency
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/etc/add_constituency (original)
+++ rtir/branches/2.3-EXPERIMENTAL/etc/add_constituency Thu Jul 19 13:32:35 2007
@@ -49,7 +49,7 @@
my %mainqueues;
# Create our four new queues
foreach my $prefix (@queue_prefixes) {
- $mainqueues{$prefix} = create_or_load_queue($prefix); # will always load
+ $mainqueues{$prefix} = load_queue($prefix); # will always load
$metaqueues{$prefix} = create_or_load_queue($prefix . " - " .$constituency);
}
@@ -195,6 +195,15 @@
return $group;
}
+sub load_queue {
+ my $name = shift;
+
+ my $queue = RT::Queue->new( $RT::SystemUser );
+ $queue->LoadByCols( Name => $name );
+ die "Couldn't load queue '$name'" unless $queue->id;
+ return $queue;
+}
+
sub create_or_load_queue {
my $name = shift;
my $queue = RT::Queue->new( $RT::SystemUser );
More information about the Rt-commit
mailing list