- if (dp instanceof EmailPinger) {
- token = RandomToken.generateToken(16);
- config = config + ":" + token;
- }
- updatePingStatus.setInt(1, rs.getInt("id"));
- updatePingStatus.execute();
- enterPingResult.setInt(1, rs.getInt("id"));
- String resp = dp.ping(Domain.getById(rs.getInt("domainid")), config, User.getById(rs.getInt("memid")));
- enterPingResult.setString(2, DomainPinger.PING_STILL_PENDING == resp ? "open" : DomainPinger.PING_SUCCEDED.equals(resp) ? "success" : "failed");
- enterPingResult.setString(3, resp);
- enterPingResult.setString(4, token);
- enterPingResult.execute();
+ token = RandomToken.generateToken(16);
+ config = config + ":" + token;
+ }
+ Domain target = conf.getTarget();
+ System.err.println("Executing " + dp + " on " + target + " (" + System.currentTimeMillis() + ")");
+ try {
+ dp.ping(target, config, target.getOwner(), conf.getId());
+ } catch (Throwable t) {
+ t.printStackTrace();
+ DomainPinger.enterPingResult(conf.getId(), "error", "exception", null);