-
Notifications
You must be signed in to change notification settings - Fork 33
[re-created]implement local event handling #85
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
[re-created]implement local event handling #85
Conversation
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.
Thank you, @imcaizheng. I've merged the PR for ES processor.
-
I guess all the logic with status would work every time we update objects, no matter if status really changed or no. For the resource bookings we've previously fixed it, so automatic update only happenes one time when status really changed from one status to another. Can we keep the same logic here for all the cases?
-
I've tested all the cases, some of them work, but some no:
- ✅ If cancel Job, then JobCandidate and ResourceBookings got
cancelled
- ❌ If assigned ResourceBooking, then JobCandidated should got
selected
, see https://monosnap.com/file/4lNjQR0hKjTuQNhMCvJmyDwNO2cKaa and https://monosnap.com/file/8NO1wRL8uLiBaChNWXPOyxVyRUlCof - ❌ If assigned 2 RouserceBooking for Job with "numPositions === 2" then job should got
assigned
see https://monosnap.com/file/qgnW7iZ54ar8cDP59o0OBG0G9jQvHK and https://monosnap.com/file/JSImWkBsMkVPW5UjptB5QQI0mQcuCJ
- ✅ If cancel Job, then JobCandidate and ResourceBookings got
Actually when a resource booking is updated, the event handler does check if status changed or not.
You could see when status is not updated the condition @maxceem You assumption is correct for the job status updating logic. We can fix it like we did mentioned above. Is it fine to do that? For the test result, it is wired it does not work for you even I validated all the cases before submitted the PR. I will check it again. |
@imcaizheng Ah, I missed this. I would suggest making this logic more clear and universal. Because now it actually couples service with event processor. As a general solution, we can send the original and updated object to the event. So in even handler we can compare if staus has changed. This way we can implement any logic in the handler, and check if the date changed or any other field if need in the future.
If it works for you, I can try to give you exact steps to reproduce it. |
@maxceem The commit |
@maxceem The commit |
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.
@imcaizheng looking at the code it seems that logic is not what is expected. Could you please, have a look.
@imcaizheng As I've already merged another PR, could you please resolve the merge conflict here? |
@maxceem Conflict resolved. |
@imcaizheng just in case, we still have this issue in this PR: |
@maxceem Good catch. it is fixed now. |
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.
@imcaizheng works perfectly now.
No description provided.