Open-EO / openeo-js-client

JavaScript and TypeScript client for the openEO API.
https://open-eo.github.io/openeo-js-client/latest/
Apache License 2.0
15 stars 6 forks source link

Job Listener #25

Closed m-mohr closed 3 years ago

m-mohr commented 3 years ago

Add an option to monitor a job easily, e.g. by a listener that informs every x seconds about status changes etc.

Should stop automatically on error/finished state.

See Web Editor.

Example from getting started guide:

var logs = await job.debugJob();
function monitor() {
  console.log(job.describeJob().status);
  logs.nextLogs().forEach(log => console.log(`${log.level}: ${log.message}`));
}
setTimeout(monitor, 30 * 1000);

Also add to services, but there it needs a "stop function".

m-mohr commented 3 years ago

Implemented