Add id to addresser ping
parent
5266cd930e
commit
7c794edce9
|
|
@ -10,13 +10,13 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.che.wsagent.server;
|
||||
|
||||
import org.eclipse.che.commons.lang.NameGenerator;
|
||||
import org.eclipse.che.commons.schedule.ScheduleRate;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
import javax.net.ssl.HttpsURLConnection;
|
||||
import java.io.IOException;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
|
@ -26,11 +26,13 @@ public class WsAgentAnalyticsAddresser {
|
|||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(WsAgentAnalyticsAddresser.class);
|
||||
|
||||
public static final String ID = NameGenerator.generate("CHA", 10);
|
||||
|
||||
@ScheduleRate(period = 1, unit = TimeUnit.HOURS)
|
||||
void send() {
|
||||
HttpURLConnection connection = null;
|
||||
try {
|
||||
final URL url = new URL("https://install.codenvycorp.com/che/init/workspace");
|
||||
final URL url = new URL("https://install.codenvycorp.com/che/init/workspace?id=" + ID);
|
||||
connection = (HttpsURLConnection)url.openConnection();
|
||||
connection.getResponseCode();
|
||||
} catch (Exception e) {
|
||||
|
|
|
|||
|
|
@ -10,13 +10,13 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.che.api.deploy;
|
||||
|
||||
import org.eclipse.che.commons.lang.NameGenerator;
|
||||
import org.eclipse.che.commons.schedule.ScheduleRate;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
import javax.net.ssl.HttpsURLConnection;
|
||||
import java.io.IOException;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
|
@ -26,11 +26,13 @@ public class WsMasterAnalyticsAddresser {
|
|||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(WsMasterAnalyticsAddresser.class);
|
||||
|
||||
public static final String ID = NameGenerator.generate("CHM", 10);
|
||||
|
||||
@ScheduleRate(period = 1, unit = TimeUnit.HOURS)
|
||||
void send() {
|
||||
HttpURLConnection connection = null;
|
||||
try {
|
||||
final URL url = new URL("https://install.codenvycorp.com/che/init/server");
|
||||
final URL url = new URL("https://install.codenvycorp.com/che/init/server?id=" + ID);
|
||||
connection = (HttpsURLConnection)url.openConnection();
|
||||
connection.getResponseCode();
|
||||
} catch (Exception e) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue