NOISSUE make instance creation task abortable
This may or may not expose issues when it actually IS used.
This commit is contained in:
parent
3018310be3
commit
fb29e45bd0
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user