- Notifications
You must be signed in to change notification settings - Fork16
Start workspaces by shelling out to CLI#518
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -303,13 +303,13 @@ | ||
CoderIcons.RUN, | ||
) { | ||
override fun actionPerformed(p0: AnActionEvent) { | ||
withoutNull(cliManager, tableOfWorkspaces.selectedObject?.workspace) {cliManager, workspace -> | ||
jobs[workspace.id]?.cancel() | ||
jobs[workspace.id] = | ||
cs.launch(ModalityState.current().asContextElement()) { | ||
withContext(Dispatchers.IO) { | ||
try { | ||
cliManager.startWorkspace(workspace.ownerName, workspace.name) | ||
loadWorkspaces() | ||
} catch (e: Exception) { | ||
logger.error("Could not start workspace ${workspace.name}", e) | ||
@@ -659,7 +659,7 @@ | ||
cs.launch(ModalityState.current().asContextElement()) { | ||
while (isActive) { | ||
loadWorkspaces() | ||
delay(1000) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. I made this poll more frequently because so it picks up the "Starting" state faster while the CLI is starting the workspace. I'm not sure if there's a good way to switch to fast polling while the CLI is running and then switch back - feel free to make suggestions or commit to the branch! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. I wonder if we can redirect the output to somewhere (or nothing, since we are not using it) so we can return immediately from the exec and | ||
} | ||
} | ||
} | ||
@@ -910,7 +910,7 @@ | ||
} | ||
private class WorkspaceVersionColumnInfo(columnName: String) : ColumnInfo<WorkspaceAgentListModel, String>(columnName) { | ||
override fun valueOf(workspace: WorkspaceAgentListModel?): String? = if (workspace == null) { | ||
"Unknown" | ||
} else if (workspace.workspace.outdated) { | ||
"Outdated" | ||
Uh oh!
There was an error while loading.Please reload this page.