Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Will update schedule more often #31

Merged

Conversation

CameronRP
Copy link
Contributor

No description provided.

@CameronRP CameronRP requested a review from mjs August 27, 2019 05:59
main.go Outdated
if err != nil {
if err := DownloadAndPlaySounds(conf.AudioDir, soundCard); err == errNoSchedule {
log.Println(err)
log.Printf("waiting %s until updateing scheduel", updateScheduleInterval)
Copy link
Member

Choose a reason for hiding this comment

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

updating schedule

main.go Outdated
player.PlayTodaysSchedule(schedule)
return nil
if waitTime > updateScheduleInterval {
time.Sleep(updateScheduleInterval)
Copy link
Member

Choose a reason for hiding this comment

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

how about just returning errNoSchedule here so that this sleep only happens in one place. You probably want to rename errNoSchedule to errTryLater or something (and change the error text)

@CameronRP CameronRP merged commit 46c0b0a into TheCacophonyProject:master Sep 16, 2019
@CameronRP CameronRP deleted the update-schedule-at-window branch September 16, 2019 05:45
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