How can I implement a polling mechanism in order to fetch the status of a job (type Status) every minute for a service that requests this object with a specific JOB_ID as an argument?
retrieveJobStatus$(JOB_ID): Observable<Status> {
const url = `//API CALL//`;
return this.http.get<Status>(url).pipe(
map(data => {
if (data) {
console.log(data)
}
return <Status>data;
})
);
}