spring-cloud-deployer-local icon indicating copy to clipboard operation
spring-cloud-deployer-local copied to clipboard

Tasks does not become RUNNING if they don't expose a http endpoint

Open udaraliyanage opened this issue 8 years ago • 1 comments

Hi,

With current implementation a task become RUNNING status only if the process is running and it has a web container. We have tasks to do one time jobs such as sending email, converting xcel to xml, some json transfers etc.. which they don't have web dependency. They never become RUNNING, instead they become LAUNCHING. My question is how reasonable to expect a task to expose a http endpoint ?

            if (exit != null) {
				if (exit == 0) {
					return LaunchState.complete;
				}
				else {
					return LaunchState.failed;
				}
	    }else{
                return LaunchState.running;
            }
			try {
				HttpURLConnection urlConnection = (HttpURLConnection) baseUrl.openConnection();
				urlConnection.setConnectTimeout(100);
				urlConnection.connect();
				urlConnection.disconnect();
				return LaunchState.running;
			}
			catch (IOException e) {
				return LaunchState.launching;
			}

udaraliyanage avatar Oct 06 '17 03:10 udaraliyanage

For tasks then perhaps we just need to ensure there is a process id.....

markpollack avatar Mar 20 '18 21:03 markpollack