Skip to content

Commit f7cbf44

Browse files
committed
feat: increase status update intervals for course and stage streams
1 parent e85ac0e commit f7cbf44

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/handler/course.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ pub async fn stream_user_course_status(
267267

268268
// Spawn a background task to fetch and send status updates.
269269
tokio::spawn(async move {
270-
let mut interval = tokio::time::interval(std::time::Duration::from_secs(5));
270+
let mut interval = tokio::time::interval(std::time::Duration::from_secs(60));
271271
loop {
272272
interval.tick().await;
273273
let status = CourseService::get_user_course(ctx.clone(), &claims.id, &slug).await;

src/handler/stage.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ pub async fn stream_user_stage_status(
231231

232232
// Spawn a background task to fetch and send status updates.
233233
tokio::spawn(async move {
234-
let mut interval = tokio::time::interval(std::time::Duration::from_secs(5));
234+
let mut interval = tokio::time::interval(std::time::Duration::from_secs(2 * 60));
235235
loop {
236236
interval.tick().await;
237237
let status =

0 commit comments

Comments
 (0)