On 01/22/2016 06:24 PM, Dietmar Maurer wrote:
+sub upid_wait {
+ my ($upid, $waitfunc, $sleep_intervall) = @_;
+
+ my $task = upid_decode($upid);
+
+ $sleep_intervall = $sleep_intervall ? $sleep_intervall : 1;
+
+ while (PVE::ProcFSTools::check_process_running($task->{pid},
$task->{pstart})) {
+
+ &$waitfunc($task) if $waitfunc && ref($waitfunc) eq 'CODE';
I would completely remove this waitfunc() code.
If someone need this, he can implement the loop himself..
sub upid_wait {
my ($upid) = @_;
...
Hmm, understandable, but then my initial use case (waiting for task in
the HA resource methods and logging active task information, like done
until yet) for this goes away.
_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel