summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api/logic/InstanceList.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/api/logic/InstanceList.cpp b/api/logic/InstanceList.cpp
index e568211b..a3f2e487 100644
--- a/api/logic/InstanceList.cpp
+++ b/api/logic/InstanceList.cpp
@@ -714,6 +714,25 @@ public:
virtual ~InstanceStaging() {};
+
+ // FIXME/TODO: add ability to abort during instance commit retries
+ bool abort() override
+ {
+ if(m_child)
+ {
+ return m_child->abort();
+ }
+ return false;
+ }
+ bool canAbort() const override
+ {
+ if(m_child)
+ {
+ return m_child->canAbort();
+ }
+ return false;
+ }
+
protected:
virtual void executeTask() override
{
@@ -727,6 +746,7 @@ protected:
private slots:
void childSucceded()
{
+ m_child.reset();
unsigned sleepTime = backoff();
if(m_parent->commitStagedInstance(m_stagingPath, m_instanceName, m_groupName))
{
@@ -744,6 +764,7 @@ private slots:
}
void childFailed(const QString & reason)
{
+ m_child.reset();
m_parent->destroyStagingPath(m_stagingPath);
emitFailed(reason);
}