Commit 28614faa authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Delete associated webtasks when deleting object.

parent 18c04f49
......@@ -1090,6 +1090,7 @@ sub Delete($;$)
if (!defined($purge));
my $imageid = $self->imageid();
my $uuid = $self->image_uuid();
DBQueryWarn("lock tables images write, image_versions write, ".
" os_info write, os_info_versions write, ".
......@@ -1117,6 +1118,8 @@ sub Delete($;$)
or goto bad;
DBQueryWarn("delete from images where imageid='$imageid'")
or goto bad;
DBQueryWarn("delete from web_tasks object_uuid='$uuid'") or
return -1;
if ($purge || !$DOPROVENANCE) {
goto bad
......
......@@ -445,6 +445,10 @@ sub Delete($) {
if (!ref($self));
my $idx = $self->idx();
my $uuid = $self->uuid();
DBQueryWarn("delete from web_tasks where uuid='$uuid'") or
return -1;
DBQueryWarn("delete from project_leases where lease_idx=$idx")
or return LEASE_ERROR_FAILED();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment