Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14682181
D18384.id44188.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D18384.id44188.diff
View Options
diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -2900,7 +2900,6 @@
'PhabricatorFilesManagementGenerateKeyWorkflow' => 'applications/files/management/PhabricatorFilesManagementGenerateKeyWorkflow.php',
'PhabricatorFilesManagementIntegrityWorkflow' => 'applications/files/management/PhabricatorFilesManagementIntegrityWorkflow.php',
'PhabricatorFilesManagementMigrateWorkflow' => 'applications/files/management/PhabricatorFilesManagementMigrateWorkflow.php',
- 'PhabricatorFilesManagementPurgeWorkflow' => 'applications/files/management/PhabricatorFilesManagementPurgeWorkflow.php',
'PhabricatorFilesManagementRebuildWorkflow' => 'applications/files/management/PhabricatorFilesManagementRebuildWorkflow.php',
'PhabricatorFilesManagementWorkflow' => 'applications/files/management/PhabricatorFilesManagementWorkflow.php',
'PhabricatorFilesOnDiskBuiltinFile' => 'applications/files/builtin/PhabricatorFilesOnDiskBuiltinFile.php',
@@ -8238,7 +8237,6 @@
'PhabricatorFilesManagementGenerateKeyWorkflow' => 'PhabricatorFilesManagementWorkflow',
'PhabricatorFilesManagementIntegrityWorkflow' => 'PhabricatorFilesManagementWorkflow',
'PhabricatorFilesManagementMigrateWorkflow' => 'PhabricatorFilesManagementWorkflow',
- 'PhabricatorFilesManagementPurgeWorkflow' => 'PhabricatorFilesManagementWorkflow',
'PhabricatorFilesManagementRebuildWorkflow' => 'PhabricatorFilesManagementWorkflow',
'PhabricatorFilesManagementWorkflow' => 'PhabricatorManagementWorkflow',
'PhabricatorFilesOnDiskBuiltinFile' => 'PhabricatorFilesBuiltinFile',
diff --git a/src/applications/files/management/PhabricatorFilesManagementPurgeWorkflow.php b/src/applications/files/management/PhabricatorFilesManagementPurgeWorkflow.php
deleted file mode 100644
--- a/src/applications/files/management/PhabricatorFilesManagementPurgeWorkflow.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-
-final class PhabricatorFilesManagementPurgeWorkflow
- extends PhabricatorFilesManagementWorkflow {
-
- protected function didConstruct() {
- $this
- ->setName('purge')
- ->setSynopsis(pht('Delete files with missing data.'))
- ->setArguments(
- array(
- array(
- 'name' => 'all',
- 'help' => pht('Update all files.'),
- ),
- array(
- 'name' => 'dry-run',
- 'help' => pht('Show what would be updated.'),
- ),
- array(
- 'name' => 'names',
- 'wildcard' => true,
- ),
- ));
- }
-
- public function execute(PhutilArgumentParser $args) {
- $console = PhutilConsole::getConsole();
-
- $iterator = $this->buildIterator($args);
- if (!$iterator) {
- throw new PhutilArgumentUsageException(
- pht(
- 'Either specify a list of files to purge, or use `%s` '.
- 'to purge all files.',
- '--all'));
- }
-
- $is_dry_run = $args->getArg('dry-run');
-
- foreach ($iterator as $file) {
- $fid = 'F'.$file->getID();
-
- try {
- $file->loadFileData();
- $okay = true;
- } catch (Exception $ex) {
- $okay = false;
- }
-
- if ($okay) {
- $console->writeOut(
- "%s\n",
- pht('%s: File data is OK, not purging.', $fid));
- } else {
- if ($is_dry_run) {
- $console->writeOut(
- "%s\n",
- pht('%s: Would purge (dry run).', $fid));
- } else {
- $console->writeOut(
- "%s\n",
- pht('%s: Purging.', $fid));
- $file->delete();
- }
- }
- }
-
- return 0;
- }
-}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jan 14, 10:03 AM (14 h, 38 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6991442
Default Alt Text
D18384.id44188.diff (3 KB)
Attached To
Mode
D18384: Remove `bin/files purge` workflow
Attached
Detach File
Event Timeline
Log In to Comment