Statistics
| Branch: | Tag: | Revision:

root / test / ganeti.workerpool_unittest.py @ 8bc17ebb

History | View | Annotate | Download (19.5 kB)

# Date Author Comment
9a2564e7 11/13/2012 09:20 pm Michael Hanselmann

workerpool: Add method to change task's priority

Using the task ID a pending task's priority can be changed. This will be
used to change the priority of jobs in the workerpool.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Bernardo Dal Seno <>

bba69414 11/13/2012 09:20 pm Michael Hanselmann

workerpool: Preserve task number when deferring

When a task is deferred it should receive the same task ID upon being
returned to the pool.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Bernardo Dal Seno <>

125b74b2 11/13/2012 09:20 pm Michael Hanselmann

workerpool: Change data structure for priority change

To prepare for the addition of a new function allowing changing a
pending task's priority, the internal data structure is slightly
changed. The (optional) task ID is stored as part of the task entry. A...

b1adc12e 11/01/2012 05:06 pm Michael Hanselmann

Remove duplicate workerpool test

Commit 52c47e4e (July 2010) added the exact test twice, probably due to
a copy & paste error.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

2f96c43c 10/18/2012 07:58 pm Michael Hanselmann

test/*.py: Replace '' with ""

There might be more, but at least replace all these low-hanging fruits.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Helga Velroyen <>

27caa993 11/17/2011 03:39 pm Michael Hanselmann

workerpool: Allow processing of new tasks to be stopped

This is different from “Quiesce” in the sense that this function just
changes an internal flag and doesn't wait for the queue to be empty.
Tasks already being processed continue normally, but no new tasks will...

c30421e0 08/25/2010 12:56 pm René Nussbaumer

Merge branch 'devel-2.2'

hansmi helped me with merging the conflict. Thanks

Conflicts:
lib/workerpool.py

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

52c47e4e 08/24/2010 06:32 pm Michael Hanselmann

workerpool: Add support for task priority

To add job priorities, the worker pool underlying the job queue must
support priorities per task. This patch adds them to the worker pool.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

daba67c7 08/24/2010 05:27 pm Michael Hanselmann

workerpool: Allow setting task name

With this patch, the task name is added to the thread name and will show up in
logs. Log messages from jobs will look like “pid=578/JobQueue14/Job13 mcpu:289
DEBUG LU locks acquired/cluster/BGL/shared”.

Signed-off-by: Michael Hanselmann <>...

b2e8a4d9 07/29/2010 04:05 pm Michael Hanselmann

workerpool: Change signature of AddTask function to not use *args

By changing it to a normal parameter, which must be a sequence, we can
start using keyword parameters.

Before this patch all arguments to “AddTask(self, *args)” were passed as
arguments to the worker's “RunTask” method. Priorities, which should be...

7ed3248b 06/17/2010 08:25 pm Guido Trotter

count the number of tasks done in the wp unittest

Currently there's no way to know if something actually gets done.
After this check we actually test that the threads do their job.

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

25e557a5 06/17/2010 08:25 pm Guido Trotter

Workerpool.AddManyTasks: check tasks type

Each task has to be a sequence, or the RunTask call will fail.

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

c2a8e8ba 06/17/2010 01:00 pm Guido Trotter

WorkerPool.AddManyTasks

Useful if we want to add many tasks at once, without contention with the
previous one we added starting.

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

89e2b4d2 01/13/2010 03:02 pm Michael Hanselmann

workerpool: Make worker ID alphanumeric

Having a proper name instead of just a number makes debugging
easier.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

25231ec5 11/03/2009 12:34 pm Michael Hanselmann

Ignore log messages in unittests

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

f1501b3f 10/02/2009 06:52 pm Michael Hanselmann

Replace all xrange() with range()

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

76094e37 07/04/2008 06:34 pm Michael Hanselmann

Add generic worker pool implementation

Reviewed-by: ultrotter