Repository navigation
feat: sequential execution of middleware - #160
Merged
Merged
Conversation
Ayush5120
marked this pull request as ready for review
July 31, 2023 13:21
fix lint with flake8
Ayush5120
force-pushed
the
restructure_middleware
branch
from
August 3, 2023 06:40
95af3d3 to
4bb3765
Compare
uniqueg
requested changes
Aug 14, 2023
uniqueg
left a comment
Member
There was a problem hiding this comment.
Please have a look at the comments. I think I would structure this differently to simplify the syntax and give an easy way to define middlewares without fallbacks. I think it would be semantically cleaner, too (and possibly also less code).
uniqueg
requested changes
Aug 31, 2023
uniqueg
requested changes
Sep 5, 2023
uniqueg
left a comment
Member
There was a problem hiding this comment.
I'm really sorry to be nagging, but I really want to get this right before it's copied into proWES :-S
Contributor
Author
No Problem at all, I will fix them all in the next commit. |
uniqueg
approved these changes
Oct 20, 2023
Closed
keshxvdayal
pushed a commit
that referenced
this pull request
Feb 7, 2026
Co-authored-by: Alex Kanitz <[email protected]>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
POST /tasksrequestsMiddlewareException; in the following example, proTES first attempts to applyMiddlewareClass1a; if it works, it will advance to the next item in the outer list,MiddlewareClass2and try to apply that; however, ifMiddlewareClass1araises an error, proTES will first try to applyMiddlewareClass1bbefore progressing toMiddlewareClass2:500responsepro_tes.middleware.abstract_middleware.AbstractMiddlewareClass; of course, any middleware class provided via external packages needs to be made available to the application (e.g., by adding the corresponding package torequirements.txtand rebuilding the app and worker images)pro_tes.plugins.middlewares.task_distributionwith all their dependenciespro_tes.plugins.middlewares.task_distribution.distance.TaskDistributionDistance) being attempted first, and with the random-based task-distribution (pro_tes.plugins.middlewares.task_distribution.random.TaskDistributionRandom) serving as a fallback; this behavior can be changed by modifying themiddlewaresapp configuration sectionpro_tes.plugins.middlewares.task_distribution.base.TaskDistributionBaseClassfor implementing other task distribution middlewaresMinor changes:
Lists,Dicts andTuples with their lowercase counterparts across the entire applicationmypycomplaints about missing type hints/stubs in external packagesPOST /taskscontroller code as a preparatory step for a major refactoringCloses #124