Skip to content
This repository was archived by the owner on Sep 19, 2021. It is now read-only.

Relay re-load teams file#50

Merged
vaage merged 3 commits intomasterfrom
relay-reload-teams
Apr 13, 2017
Merged

Relay re-load teams file#50
vaage merged 3 commits intomasterfrom
relay-reload-teams

Conversation

@vaage
Copy link
Copy Markdown
Contributor

@vaage vaage commented Apr 13, 2017

Before the relay would only read the teams file at the start-up. This meant that the relay would have to be restarted whenever a new team was added.

This change makes the relay reload the teams file every minute so that if a new team is added, they will have access within a minute. This will prevent the relay having to be taken down and losing all its data each time a new team comes on line.

Before the relay would only read the teams file at the start-up. This
meant that the relay would have to be restarted whenever a new team
was added.

This change makes the relay reload the teams file every minute so that
if a new team is added, they will have access within a minute. This will
prevent the relay having to be taken down and losing all its data each
time a new team comes on line.
@vaage vaage added this to the Relay Server Completion milestone Apr 13, 2017
@vaage vaage self-assigned this Apr 13, 2017
@vaage vaage requested a review from crepricg April 13, 2017 20:56
This fixes a compile error for Java 7 where final statements were
needed for the reload team data call.
@vaage
Copy link
Copy Markdown
Contributor Author

vaage commented Apr 13, 2017

This change does not affect students so it should be safe to merge to master and release.

private static void startRelay(Server relay, ConnectionSource source) {
private static void startRelay(final Server relay,
final ConnectionSource source,
final String teamFile) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Only 'server' and 'teamFile' actually needed to be final, but I felt it was easier to read if they were all made final. The only side-effect this creates is that you can't re-assign 'source' but it should never be re-assigned anyways.

Comment thread src/codeu/chat/RelayMain.java Outdated
loadTeamInfo(relay, teamFile);
LOG.info("Done loading team data.");

// Add this again in 1 minute so that new entries to the time line will
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit. timeline

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also, I am not sure what this comment is telling me.

The comment about why the loadTeamInfo was adding itself to the timeline made no sense. This corrects the message to be comprehendible.
@vaage vaage merged commit 3fc4497 into master Apr 13, 2017
@vaage vaage deleted the relay-reload-teams branch April 13, 2017 23:07
@vaage vaage restored the relay-reload-teams branch April 13, 2017 23:07
@vaage vaage deleted the relay-reload-teams branch April 16, 2017 03:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants