- GigiResultSet rs = searchNeededPings.executeQuery();
- while (rs.next()) {
- handle(DomainPingConfiguration.getById(rs.getInt("id")));
- }
- try {
- Thread.sleep(5000);
- } catch (InterruptedException e) {
+ GigiResultSet rs = searchNeededPings.executeQuery();
+ while (rs.next()) {
+ worked = true;
+ handle(DomainPingConfiguration.getById(rs.getInt("id")));
+ }
+ try {
+ if ( !worked) {
+ Thread.sleep(5000);
+ }
+ } catch (InterruptedException e) {
+ }
+ } catch (Throwable t) {
+ t.printStackTrace();