-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
feat(workflow-engine): add AssignedToConditionHandler
#82956
Conversation
for assignee in assignees: | ||
if assignee.team and assignee.team_id == target_id: | ||
return True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think we could refactor this slightly
for assignee in assignees: | |
if assignee.team and assignee.team_id == target_id: | |
return True | |
return any(assignee.team and assignee.team_id == target_id for assignee in assignees) |
and similarly for the chunk below
assignee_list: Sequence[GroupAssignee] | None = cache.get(cache_key) | ||
if assignee_list is None: | ||
assignee_list = list(group.assignee_set.all()) | ||
cache.set(cache_key, assignee_list, 60) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is 60 in seconds? is that a bit short 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤷🏼
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the original PR doesn't have much context 😭 oh well. at least we're keeping it the same
634b579
to
f59c16a
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #82956 +/- ##
===========================================
+ Coverage 45.27% 87.56% +42.29%
===========================================
Files 9407 9423 +16
Lines 535958 536696 +738
Branches 21119 21106 -13
===========================================
+ Hits 242632 469965 +227333
+ Misses 292966 66366 -226600
- Partials 360 365 +5 |
add `AssignedToConditionHandler`
add
AssignedToConditionHandler