assemblee-virtuelle / semapps

A toolbox to create semantic web applications
https://semapps.org
Apache License 2.0
87 stars 8 forks source link

New command to delete orphan files #1147

Open srosset81 opened 1 year ago

srosset81 commented 1 year ago

Currently when we remove a file from a resource, the file is not deleted.

This is not a big problem, but it cluters the triplestore with data.

The easiest would be a Moleculer command to remove the triples and the files.

Put it inside MigrationService ?

srosset81 commented 10 months ago

Now the semantic data provider delete files when the update method detects deleted files: https://github.com/assemblee-virtuelle/semapps/pull/1197

A comment form @mguihal to note:

If in the future, we may want to share files between resources (not sure to see the use cases though...), it will need more brainstorm to correctly implement it. In that case, maybe the logic of upload/deletion will have not to be handled by Semapps but by the end-user apps who will know when it's necessary to delete what resource I think.

A clean up command could still be useful for migration purpose.

mguihal commented 10 months ago

If this is done inside MigrationService, how can it be called easily on a project using Semapps? This would be a one-time command, so it should be run alongside the middleware Molecular broker, but not inside it, isn't it?

srosset81 commented 10 months ago

I don't understand why this command couldn't be a simple Moleculer action ?

I would put it here: https://semapps.org/docs/middleware/migration