Lock device_port table when updating Device Ports (closes #40)
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
* Return first port neighbor match, if multiple devices claim the IP (closes #42)
|
* Return first port neighbor match, if multiple devices claim the IP (closes #42)
|
||||||
* Should handle empty ports preferences (closes #39)
|
* Should handle empty ports preferences (closes #39)
|
||||||
* Decode more entPhysicalEntry columns as UTF-8 (closes #37)
|
* Decode more entPhysicalEntry columns as UTF-8 (closes #37)
|
||||||
|
* Lock device_port table when updating Device Ports (closes #40)
|
||||||
|
|
||||||
2.018000 - 2013-10-08
|
2.018000 - 2013-10-08
|
||||||
|
|
||||||
|
|||||||
@@ -282,7 +282,7 @@ sub store_interfaces {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
schema('netdisco')->txn_do(sub {
|
schema('netdisco')->resultset('DevicePort')->txn_do_locked(sub {
|
||||||
my $gone = $device->ports->delete({keep_nodes => 1});
|
my $gone = $device->ports->delete({keep_nodes => 1});
|
||||||
debug sprintf ' [%s] interfaces - removed %s interfaces',
|
debug sprintf ' [%s] interfaces - removed %s interfaces',
|
||||||
$device->ip, $gone;
|
$device->ip, $gone;
|
||||||
|
|||||||
@@ -4,6 +4,10 @@ use base 'DBIx::Class::ResultSet';
|
|||||||
use strict;
|
use strict;
|
||||||
use warnings FATAL => 'all';
|
use warnings FATAL => 'all';
|
||||||
|
|
||||||
|
__PACKAGE__->load_components(qw/
|
||||||
|
+App::Netdisco::DB::ExplicitLocking
|
||||||
|
/);
|
||||||
|
|
||||||
=head1 ADDITIONAL METHODS
|
=head1 ADDITIONAL METHODS
|
||||||
|
|
||||||
=head2 with_times
|
=head2 with_times
|
||||||
|
|||||||
Reference in New Issue
Block a user