Permalink
Browse files

NOISSUE make instance creation task abortable

This may or may not expose issues when it actually IS used.
  • Loading branch information...
peterix committed Dec 10, 2018
1 parent 3018310 commit fb29e45bd0e8f4e696c4c71f43adb3fd9690d1d4
Showing with 21 additions and 0 deletions.
  1. +21 −0 api/logic/InstanceList.cpp
@@ -714,6 +714,25 @@ Q_OBJECT

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 @@ Q_OBJECT
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);
}

0 comments on commit fb29e45

Please sign in to comment.