Update disk usage per user (du on users directories..) (MVP)
Update disk usage on a per workflow basis
An optimization for this would be to have a new datetime field modified in Workflow table and just run du on the ones that changed since the last check.
Consider having an underlying function to calculate quota usage and to store it in the DB. We can call it not only each night, but let it be triggered in different scerarios:
after a workflow run was finished successfully or unsuccessfully for user johndoe
after johndoe forced stopped a workflow
after johndoe closed a session
and then also each night for each user as a sort of catch-up in case some of the above did not work.
As we have done in the system-status daily notifications, we can create a cronjob to every night update all disk usage in REANA DB.
Note that we can:
du
on users directories..) (MVP)modified
in Workflow table and just rundu
on the ones that changed since the last check.