Skip to content

Instantly share code, notes, and snippets.

@NetanelBasal
Last active October 30, 2022 07:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NetanelBasal/1ec5526fbac8a6adc97f8eef6da463cc to your computer and use it in GitHub Desktop.
Save NetanelBasal/1ec5526fbac8a6adc97f8eef6da463cc to your computer and use it in GitHub Desktop.
import { repeat } from 'rxjs';
@Injectable({ providedIn: 'root' })
export class MetricsService {
private http = inject(HttpClient);
getMetrics() {
return this.http.get('https://metrics')
.pipe(
repeat({ delay: 30_000 }),
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment