Skip to content
Snippets Groups Projects
Commit c93a52ef authored by Chris Hines's avatar Chris Hines
Browse files

refresh jobs as soon as we are logged in

parent dbb9eef1
4 merge requests!106if stat fails, display the error instead of immediately refreshing...,!99Dev,!66Test,!64Dev
Pipeline #10691 passed
......@@ -23,6 +23,7 @@ import { SshAuthzServer } from '../identity';
import { ComputesitesService } from '../computesites.service';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
import { SettingsService} from '../settings.service';
import { JobsService} from '../jobs.service';
......@@ -68,6 +69,7 @@ export class LauncherComponent implements OnInit {
private route: ActivatedRoute,
private strudelappsService: StrudelappsService,
public settingsService: SettingsService,
private jobsService: JobsService,
) {
this.app$ = new BehaviorSubject<Strudelapp>(null);
......@@ -170,6 +172,7 @@ export class LauncherComponent implements OnInit {
this.subscriptions.push(this.authService.sshAuthzServers.subscribe(o => {this.updateSshAuthZServers(o)}));
this.subscriptions.push(this.computeSitesService.identities.subscribe(o => this.navLogin(o)));
this.subscriptions.push(this.computeSitesService.appidentities.subscribe(o => this.getHealth(o)));
this.subscriptions.push(this.identity$.subscribe(o => this.jobsService.setId(o)));
}
......
......@@ -90,7 +90,7 @@ getUserHealth(identity: Identity) {
params.set('host',JSON.stringify(identity.site.host));
params.set('username',JSON.stringify(identity.username));
this.updateUserHealthSub = this.http.get<Health[]>(this.Base+'/stat'+'?'+params.toString(),options)
this.updateUserHealthSub = this.runCommand(identity,identity.site.userhealth)
.pipe(takeUntil(this.cancelRequests$))
.subscribe(resp => this.addUserHealth(identity,resp), error => this.getUserHealthError(error,identity));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment