Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
e2de78b8
Commit
e2de78b8
authored
Oct 08, 2014
by
Leigh B Stoller
Browse files
Add method to find and delete webtask associated with an object.
parent
051ceae4
Changes
1
Hide whitespace changes
Inline
Side-by-side
db/WebTask.pm.in
View file @
e2de78b8
...
...
@@ -287,5 +287,21 @@ sub HasExited($)
return
(
defined
($
self
->
exited
())
?
1
:
0
);
}
#
#
Delete
webtask
associated
with
an
object
.
Class
method
.
#
sub
DeleteByObject
($$)
{
my
($
class
,
$
object
)
=
@
_
;
my
$
uuid
=
(
ref
($
object
)
?
$
object
->
uuid
()
:
$
object
);
my
$
webtask
=
WebTask
->
LookupByObject
($
uuid
);
return
0
if
(
!defined($webtask));
$
webtask
->
Delete
();
return
0
;
}
#
_Always_
make
sure
that
this
1
is
at
the
end
of
the
file
...
1
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment