Refactor upgrade scripts to better delete files and workflow activities.
This commit is contained in:
parent
d3b574da13
commit
0da6ffab15
3 changed files with 7 additions and 4 deletions
|
|
@ -42,7 +42,6 @@ done;
|
|||
|
||||
start_step "Removing Admin Bar module";
|
||||
|
||||
my $webgui_root = realpath( File::Spec->catdir( WebGUI::Paths->configBase, (File::Spec->updir) x 1) );
|
||||
unlink File::Spec->catfile($webgui_root, 'lib', 'WebGUI', 'Macro', 'AdminBar.pm');
|
||||
rm_lib('WebGUI::Macro::AdminBar');
|
||||
|
||||
done;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ done;
|
|||
|
||||
start_step "Removing FilePile asset module";
|
||||
|
||||
my $webgui_root = realpath( File::Spec->catdir( WebGUI::Paths->configBase, (File::Spec->updir) x 1 ) );
|
||||
unlink File::Spec->catfile($webgui_root, 'lib', 'WebGUI', 'Asset', 'FilePile.pm');
|
||||
rm_lib('WebGUI::Asset::FilePile');
|
||||
|
||||
done;
|
||||
|
|
|
|||
|
|
@ -7,12 +7,17 @@ start_step "Removing WebGUI statistics workflows and code";
|
|||
|
||||
config->deleteFromHash( 'adminConsole', 'statistics' );
|
||||
|
||||
report "Deleting Workflow Activities";
|
||||
my $activity = dbh->write(q|delete from WorkflowActivity where className='WebGUI::Workflow::Activity::SendWebguiStats'|);
|
||||
|
||||
report "Deleting Workflow and Cron";
|
||||
my $workflow = WebGUI::Workflow->new(session, 'send_webgui_statistics');
|
||||
$workflow->delete;
|
||||
##This may not be in there if it is not enabled.
|
||||
my $task = WebGUI::Workflow::Cron->new(session, 'send_webgui_statistics');
|
||||
$task && $task->delete;
|
||||
|
||||
report "Deleting files";
|
||||
my $webgui_root = realpath( File::Spec->catdir( WebGUI::Paths->configBase, (File::Spec->updir) x 1 ) );
|
||||
unlink File::Spec->catfile($webgui_root, 'lib', 'WebGUI', 'Operation', 'Statistics.pm');
|
||||
unlink File::Spec->catfile($webgui_root, 'lib', 'WebGUI', 'Workflow', 'Activity', 'SendWebguiStats.pm');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue