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

SAK-49949 tasks Soft delete tasks for soft deleted sites #12945

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

adrianfish
Copy link
Contributor

@@ -21,11 +21,11 @@
<bean id="org.sakaiproject.tasks.api.TaskService"
class="org.sakaiproject.tasks.impl.TaskServiceImpl" init-method="init">

<property name="transactionTemplate">
<!--property name="transactionTemplate">
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove

@adrianfish adrianfish requested a review from jesusmmp October 11, 2024 11:03
@adrianfish
Copy link
Contributor Author

@ern SOFT_DELETED because they mimic site soft deletion. If the sites are restored, then the tasks are too.

@ern
Copy link
Contributor

ern commented Oct 14, 2024

Yeah I understand that but I am not convinced it makes sense to mark the data as softly deleted if the site is softly deleted.

Simply checking if the site is softly deleted (SAKAI_SITE.IS_SOFTLY_DELETED) should be enough to say don't load tasks from this site.

@adrianfish
Copy link
Contributor Author

Ok, fair enough. I can do that.

@adrianfish
Copy link
Contributor Author

@ern Updating to check all the sites when loading up the synoptic tasks would take potentially a lot of calls to the site service. I know they are cached, but still.

@@ -95,7 +98,10 @@ public void update(Observable o, Object arg) {
if (event.getEvent().equals(SiteService.SECURE_UPDATE_SITE_MEMBERSHIP)) {
try {
Set<String> siteUsers = siteService.getSite(event.getContext()).getUsers();
Copy link
Contributor

Choose a reason for hiding this comment

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

I know this is out of scope for your PR, just an FYI for anyone following. event.getContext() is usually null here. also it can get called thousands of times in quick succession during SIS updates ;)

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.

4 participants