-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously, we were polling all the user's workspaces to get information about autostop and deletion so we can notify the user when those things are about to happen. This has a few problems: We really only want to notify for the workspace to which we are actively connected, not all workspaces. It did not account for owners being connected to someone else's workspace. We would have to query all workspaces, which is an even more expensive query. If the sidebar is open, we are running two of the same query every five seconds, which is wasteful. We already had a web socket that was used to notify about the workspace being outdated, so I broke that into a new class and combined all the notifications (outdated, autostop, deletion), status bar updates (just shows if the workspace is outdated), and context updates into one place using that web socket. Secondly, fix an issue where we immediately start polling when connecting to a remote even though the Coder sidebar is not visible. Now, we should only be polling when the sidebar is visible.
- Loading branch information
1 parent
62a3520
commit 39bbc89
Showing
6 changed files
with
226 additions
and
276 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.