Skip to content
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

fix: only fire the post_log signal when the log is created or when there is an error #561

Conversation

aqeelat
Copy link
Member

@aqeelat aqeelat commented Sep 6, 2023

Closes #536

@aqeelat aqeelat requested a review from hramezani September 6, 2023 11:20
@aqeelat
Copy link
Member Author

aqeelat commented Sep 6, 2023

@hramezani should we expose force_log or is that an internal variable?

@codecov
Copy link

codecov bot commented Sep 6, 2023

Codecov Report

Merging #561 (21c90eb) into master (858034b) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #561      +/-   ##
==========================================
+ Coverage   94.96%   94.98%   +0.02%     
==========================================
  Files          31       31              
  Lines         994      998       +4     
==========================================
+ Hits          944      948       +4     
  Misses         50       50              
Files Changed Coverage Δ
auditlog/signals.py 100.00% <ø> (ø)
auditlog/receivers.py 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

CHANGELOG.md Outdated
@@ -7,6 +7,7 @@
#### Improvements

#### Fixes
* only fire the `post_log` signal when the log is created or when there is an error in the process.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* only fire the `post_log` signal when the log is created or when there is an error in the process.
- fix: Only fire the `post_log` signal when the log is created or when there is an error in the process.

hramezani
hramezani previously approved these changes Sep 6, 2023
@hramezani
Copy link
Member

Thanks @aqeelat for the path 🙏

I only left a suggestion. Other than that, LGTM 👍

@hramezani should we expose force_log or is that an internal variable?

Not for now

@aqeelat
Copy link
Member Author

aqeelat commented Sep 7, 2023

@hramezani then I guess we shouldn't pass it to the post_log signal?

@hramezani
Copy link
Member

@hramezani then I guess we shouldn't pass it to the post_log signal?

yes, let's not pass it for now.

@aqeelat aqeelat force-pushed the 536-custom-signal-post_log-is-triggered-even-when-logentry-is-not-created branch from 5e2327d to 21c90eb Compare September 7, 2023 12:22
@hramezani hramezani merged commit af31261 into jazzband:master Sep 7, 2023
@hramezani
Copy link
Member

Thanks @aqeelat

@aqeelat aqeelat deleted the 536-custom-signal-post_log-is-triggered-even-when-logentry-is-not-created branch September 8, 2023 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom signal post_log is triggered even when LogEntry is not created
2 participants