This repository was archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Allow background tasks to be run on a separate worker. #8369
Merged
Merged
Changes from 12 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
71ade09
Allow background tasks to be run on a separate worker.
clokep 094b11e
Only run function on background worker.
clokep fd8aad3
Accept a worker name instead of using a flag.
clokep 67c6fa4
Remove check for being the background_worker app.
clokep 08a7d5d
Do not allow a non-existent worker app.
clokep 0d06a87
Also run the user directory updating in the backgronud.
clokep 2e98b78
Ensure the proper handlers are loaded during start-up.
clokep b77b89b
Backout some of the changes to simplify the PR.
clokep f26b92e
Ensure that the background tasks have access to the proper stores.
clokep 53a4402
Add some documentation.
clokep 82d167b
Do not require a replication endpoint for the instance map.
clokep 0c9e970
Clarify confusing wording.
clokep d40aff7
Do not require the background worker instance to be in the instance map.
clokep c015379
Update the sample config.
clokep cfe28f2
The user directory background tasks are controlled by a separate flag.
clokep f0c83d9
Rename instance variable.
clokep b226c49
Allow the phone home stats to be able to run on any worker.
clokep cb740cf
Move around some storage classes to make the proper metrics methods a…
clokep 179d8c3
Consolidate logic for starting metrics calls.
clokep 9fb2c05
Merge remote-tracking branch 'origin/develop' into clokep/background-…
clokep File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Allow running background tasks in a separate worker process. |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -288,8 +288,6 @@ async def get_user_agents_ips_to_ui_auth_session( | |
) | ||
return [(row["user_agent"], row["ip"]) for row in rows] | ||
|
||
|
||
class UIAuthStore(UIAuthWorkerStore): | ||
async def delete_old_ui_auth_sessions(self, expiration_time: int) -> None: | ||
""" | ||
Remove sessions which were last used earlier than the expiration time. | ||
|
@@ -339,3 +337,7 @@ def _delete_old_ui_auth_sessions_txn( | |
iterable=session_ids, | ||
keyvalues={}, | ||
) | ||
|
||
|
||
class UIAuthStore(UIAuthWorkerStore): | ||
pass | ||
Comment on lines
+342
to
+343
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. Would it make more sense to remove the 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. Potentially, though its not the worse to keep the separation for consistency. |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.