mirror of
https://github.com/hauke68/Magallanes.git
synced 2026-08-29 10:38:57 +02:00
Rollback awareness.
Tasks are aware if they are in rollbacks; they will be invoked only if they implement the new interface RollbackAware.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
class Task_SampleTaskRollbackAware
|
||||
extends Mage_Task_TaskAbstract
|
||||
implements Mage_Task_Releases_RollbackAware
|
||||
{
|
||||
public function getName()
|
||||
{
|
||||
if ($this->inRollback()) {
|
||||
return 'A Sample Task aware of rollbacks [in rollback]';
|
||||
} else {
|
||||
return 'A Sample Task aware of rollbacks [not in rollback]';
|
||||
}
|
||||
}
|
||||
|
||||
public function run()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user