Skip to content

Commit

Permalink
Stop bot when initiating a delete
Browse files Browse the repository at this point in the history
  • Loading branch information
mbogoevici committed Jun 8, 2012
1 parent 9b331e3 commit e69d317
Showing 1 changed file with 6 additions and 3 deletions.
Expand Up @@ -74,9 +74,12 @@ public void stop() {

@Override
public void deleteAll() {
for (Booking booking : bookingService.getAll(MultivaluedHashMap.<String, String>empty())) {
event.fire("Deleted booking " + booking.getCancellationCode() + " for " + booking.getContactEmail() + "\n");
bookingService.deleteBooking(booking.getId());
synchronized (bot) {
stop();
for (Booking booking : bookingService.getAll(MultivaluedHashMap.<String, String>empty())) {
event.fire("Deleted booking " + booking.getCancellationCode() + " for " + booking.getContactEmail() + "\n");
bookingService.deleteBooking(booking.getId());
}
}
}

Expand Down

0 comments on commit e69d317

Please sign in to comment.