Skip to content

Commit

Permalink
removed delays
Browse files Browse the repository at this point in the history
  • Loading branch information
kkarakas committed Feb 27, 2025
1 parent 8c2584e commit 69e70cd
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 18 deletions.
Binary file modified projects/WTI-API/WebContent/WEB-INF/lib/pc2.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export class ClarificationsPageComponent implements OnInit, OnDestroy {

this._contestService.clarificationsUpdated
.pipe(
delay(300),
takeUntil(this._unsubscribe))
.subscribe(_ => {
this.loadClars();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,22 @@ export class NewClarificationComponent implements OnInit, OnDestroy {

this._teamService.postClarification(newClarification)
.pipe(takeUntil(this._unsubscribe))
.subscribe(_ => {
this.newClarificationForm.reset();
this.close();
this._contestService.clarificationsUpdated.next();
this._uiHelper.alertOk('Clarification has been submitted successfully!');
}, (error: any) => {
console.error('error submitting new clarification');
console.error(error);
});
.subscribe({
next: value => {
console.log('Received value:', value);
this.newClarificationForm.reset();
this.close();
this._contestService.clarificationsUpdated.next();
this._uiHelper.alertOk('Yo Clarification has been submitted successfully! '+value);
},
error: (error: any) => {
console.error('error submitting new clarification');
console.error(error);
},
complete: () => {
// Called when the observable completes
console.log('Observable completed');
}});
}

close(): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,18 +129,24 @@ export class NewRunComponent implements OnInit, OnDestroy {
//submit the run
this._teamService.submitRun(model)
.pipe(takeUntil(this._unsubscribe))
.subscribe(_ => {
this.clearNewSubmission();
.subscribe({
next: value => {
console.log('Received value:', value);
this.clearNewSubmission();
this.close();
this._uiHelper.alertOk('Run has been submitted successfully!');
this._teamService.runsUpdated.next();
}, (error: any) => {
this._uiHelper.alertError('Error submitting problem! Check console for details');
},
error: (error: any) => {
this._uiHelper.alertError('Error submitting problem! Check console for details');
console.error(error);
});
},
complete: () => {
// Called when the observable completes
console.log('Observable completed');
}});
}
}
}

async buildFileSubmission(file: File) {
const fileSubmission = new FileSubmission();
const fileContents = await this.fileReader(file);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export class RunsPageComponent implements OnInit, OnDestroy {
// when runs are updated, trigger a reload
this._teamService.runsUpdated
.pipe(
delay(300),
takeUntil(this._unsubscribe))
.subscribe(_ => {
this.loadRuns();
Expand Down

0 comments on commit 69e70cd

Please sign in to comment.