[pve-devel] [PATCH manager 1/2] task index: optionally include active tasks
Fabian Grünbichler
f.gruenbichler at proxmox.com
Fri Jan 4 13:33:04 CET 2019
On Fri, Dec 28, 2018 at 10:34:09AM +0100, Wolfgang Bumiller wrote:
> On Wed, Dec 19, 2018 at 09:37:20AM +0100, Fabian Grünbichler wrote:
> > otherwise there is no way to find out about those tasks over the API if
> > the UPID was not recorded when the initial API call happened.
> >
> > Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
> > ---
> >
> > Notes:
> > this is a nice addition for external monitoring/dashboard/UI
> > applications, e.g. see #1997
> >
> > PVE/API2/Tasks.pm | 47 +++++++++++++++++++++++++++++++++++++----------
> > 1 file changed, 37 insertions(+), 10 deletions(-)
> >
> > diff --git a/PVE/API2/Tasks.pm b/PVE/API2/Tasks.pm
> > index a5acb118..95a13c56 100644
> > --- a/PVE/API2/Tasks.pm
> > +++ b/PVE/API2/Tasks.pm
> > @@ -58,6 +58,12 @@ __PACKAGE__->register_method({
> > default => 0,
> > optional => 1,
> > },
> > + active => {
> > + type => 'boolean',
>
> Do we maybe want this to be a tristate value? Inactive-only, active-only
> or all tasks?
easily done, and might make sense for some clients. will include in v2
>
> > + default => 0,
> > + optional => 1,
> > + description => 'Include currently active tasks.',
> > + },
> > },
> > },
> > returns => {
More information about the pve-devel
mailing list