fix: sas viya service init timing issue
Build / Build-and-ng-test (pull_request) Failing after 48s
Build / Build-and-test-development (pull_request) Failing after 1m15s

This commit is contained in:
Mihajlo Medjedovic
2025-05-23 13:35:37 +02:00
parent 983f59cd51
commit 9de04e9a0c
2 changed files with 15 additions and 4 deletions
+14 -4
View File
@@ -62,14 +62,24 @@ export class SasViyaService {
private http: HttpClient,
private appStoreService: AppStoreService
) {
}
/**
* This function is replacing the constructor.
* The reason for this is timing issues, other services eg. sas.service, app-store.service
* must be initialized before this bit of code is executed.
* This function is being called by `sas.service`
*/
setup() {
const adapterConfig = this.appStoreService.getDcAdapterSettings()
this.serverUrl = adapterConfig?.serverUrl || ''
//example
this.getByCollection('jobs').subscribe((res) => {
console.log('res', res)
})
//example collection request
// this.getByCollection('jobs').subscribe((res) => {
// console.log('res', res)
// })
}
/**
+1
View File
@@ -55,6 +55,7 @@ export class SasService {
this.dcAdapterSettings = this.appStoreService.getDcAdapterSettings()
this.sasjsService.setup()
this.sasViyaService.setup()
if (!this.dcAdapterSettings) {
this.eventService.showInfoModal(