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()
|
@DBOS.workflow()
|
||||||
async startQuiz(partyId: string): Promise<void> {
|
async startQuiz(partyId: string): Promise<void> {
|
||||||
await partyAnalysisWorkflow.analyzeParty(partyId);
|
await partyAnalysisWorkflow.analyzeParty(partyId);
|
||||||
await this.runQuiz(partyId);
|
await QuizWorkflow.runQuiz(partyId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@DBOS.workflow()
|
@DBOS.workflow()
|
||||||
async restartQuiz(partyId: string): Promise<void> {
|
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 = {
|
const quizState: QuizState = {
|
||||||
status: "running",
|
status: "running",
|
||||||
workflowId: DBOS.workflowID ?? null,
|
workflowId: DBOS.workflowID ?? null,
|
||||||
|
|
@ -150,7 +150,6 @@ export class QuizWorkflow extends ConfiguredInstance {
|
||||||
partyId: string,
|
partyId: string,
|
||||||
quizState: QuizState,
|
quizState: QuizState,
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
console.log(partyId, quizState);
|
|
||||||
await updatePartyData(db, partyId, quizState);
|
await updatePartyData(db, partyId, quizState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue