Skip to content

Separate polling of cart and queued Downloads#76

Merged
patrick-austin merged 3 commits into36_queuingfrom
75_separate_queue_polling
Apr 2, 2025
Merged

Separate polling of cart and queued Downloads#76
patrick-austin merged 3 commits into36_queuingfrom
75_separate_queue_polling

Conversation

@patrick-austin
Copy link

Also reduces severity of the DownloadRepository logging, adds a log after prepareData returns the preparedId (INFO)

Closes #75

}
}

@Schedule(hour = "*", minute = "*", second = "*")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like polling the queue every second is too much as in this case we don't have the problem of the potential user logouts like we do for the other poll. Probably once every 10 mins is enough. Perhaps it is even worth making this configurable so that we can set it low to speed up testing and then increase it in production?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't make it configurable with the cron syntax, as the arguments provided to the @Schedule decorator have to be constants. We could make it configurable with an internal timer, similar to have it's done for the existing poll (either with a single last checked time applied outside the for loop or one for each Download within it). Or we could not use @Schedule and use the Timer class instead. Or just hardcode it to a different frequency.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I think for now we should just go with setting it to 10 mins

@patrick-austin patrick-austin merged commit c378617 into 36_queuing Apr 2, 2025
2 checks passed
@patrick-austin patrick-austin deleted the 75_separate_queue_polling branch April 2, 2025 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants