fix quiz startup
This commit is contained in:
parent
d72bc9a303
commit
2ca3de3c75
1 changed files with 3 additions and 4 deletions
|
|
@ -33,15 +33,15 @@ export class QuizWorkflow extends ConfiguredInstance {
|
|||
@DBOS.workflow()
|
||||
async startQuiz(partyId: string): Promise<void> {
|
||||
await partyAnalysisWorkflow.analyzeParty(partyId);
|
||||
await this.runQuiz(partyId);
|
||||
await QuizWorkflow.runQuiz(partyId);
|
||||
}
|
||||
|
||||
@DBOS.workflow()
|
||||
async restartQuiz(partyId: string): Promise<void> {
|
||||
await this.runQuiz(partyId);
|
||||
await QuizWorkflow.runQuiz(partyId);
|
||||
}
|
||||
|
||||
private async runQuiz(partyId: string): Promise<void> {
|
||||
private static async runQuiz(partyId: string): Promise<void> {
|
||||
const quizState: QuizState = {
|
||||
status: "running",
|
||||
workflowId: DBOS.workflowID ?? null,
|
||||
|
|
@ -150,7 +150,6 @@ export class QuizWorkflow extends ConfiguredInstance {
|
|||
partyId: string,
|
||||
quizState: QuizState,
|
||||
): Promise<void> {
|
||||
console.log(partyId, quizState);
|
||||
await updatePartyData(db, partyId, quizState);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue