Commit Graph

7 Commits

Author SHA1 Message Date
Christoph Wurst d9015a8c94
Format code to a single space around binary operators
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-05 20:25:24 +02:00
Morris Jobke 24744dcaec
Migrate verbose messages to inline syntax of writeln()
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-09-17 16:30:33 +02:00
Morris Jobke 617b3f79fa
Show lock messages only in verbose mode
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-09-17 16:30:11 +02:00
Morris Jobke faab3e733b
Allow to run occ preview:repair in parallel
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-09-17 16:03:34 +02:00
Christoph Wurst 2a054e6c04
Update the license headers for Nextcloud 20
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-08-24 14:54:25 +02:00
Morris Jobke 545f806666
Use array_filter instead
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-07 10:42:09 +02:00
Morris Jobke d8734b3b93
Add occ preview:migrate to migrate previews from the old flat structure to a subfolder structure
* `php occ preview:repair` - a preview migration tool that moves existing previews into the new location introduced with #19214
* moves `appdata_INSTANCEID/previews/FILEID` to `appdata_INSTANCEID/previews/0/5/8/4/c/e/5/FILEID`
* migration tool can be stopped during migration via `CTRL+C` - it then finishes the current folder (with the previews of one file) and stops gracefully
* if a PHP memory limit is set in the `php.ini` then it will stop automatically once it has less than 25 MiB memory left (this is to avoid hard crashes in the middle of a migration)
* the tool can be used during operation - possible drawbacks:
    * there is the chance of a race condition that a new preview is generated in the moment the folder is already migrated away - so the old folder with the newly cached preview is deleted and one cached preview needs to be re-generated
    * there is the chance of a race condition during access of a preview while it is migrated to the other folder - then no preview can be shown and results in a 404 (as of now this is an accepted risk)

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-06 22:05:46 +02:00