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

CODENVY-1271: refactor projects backuping #1371

Merged
merged 2 commits into from
Dec 21, 2016
Merged

CODENVY-1271: refactor projects backuping #1371

merged 2 commits into from
Dec 21, 2016

Conversation

garagatyi
Copy link
Contributor

@garagatyi garagatyi commented Dec 19, 2016

What does this PR do?

Refactor projects backuping.
Detect user in dev-machine container to backup projects.

What issues does this PR fix or reference?

Fixes #1271

Previous Behavior

Restoring of workspaces created from images without rsync failed.

New Behavior

Such workspaces starts well.

Tests written?

Yes

}

@ScheduleRate(initialDelay = 1, period = 1, unit = TimeUnit.MINUTES)
public void scheduleBackup() {
for (Map.Entry<String, WorkspaceRuntimes.WorkspaceState> wsStateEntry :
workspaceRuntimes.getWorkspaces().entrySet()) {

String workspaceId = wsStateEntry.getKey();
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see usage of wsStateEntry.getValue(). Would it better to use workspaceRuntimes.getWorkspaces().keySet() for loop?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, Ill fix that. Thanks.

srcUserName,
destPath);
} catch (IOException | ServerException e) {
throw new ServerException(e.getLocalizedMessage(), e);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why you should catch ServerException to rethrow it as ServerException?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll fix, thanks

Refactor projects backuping.
Detect user in dev-machine container to backup projects.
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.

All bitnami stacks do not work on the nightly server
5 participants