...
The Queue attribute was created to address this situation.
...
...
...
...
...
...
...
...
...
...
...
...
|
Code Block |
---|
suite test
family |
|
---|
...
...
...
001 002 003 004 005 006
task |
|
---|
...
Code Block |
---|
suite test_queue
family f1
queue q1 queue q2 1 2 3001 002 003 004 005 006 007
task t
endfamily
taskfamily bf2
queue q2 1 2 3 4 5 trigger /test_queue/f1:q1 > 16 8 9 10
task a
task b
# notice that queue name is accessible to the trigger
trigger /test_queue/f1:q1 > 5 task c
task c
trigger ../test_queue/f2/a:q2 > 19
endfamily
endsuite |
There is a new child command --queue, that will signal when a step is active, complete, or has aborted.
...
This attribute makes it possible to follow a producer(server)/consumer(tasks) pattern. Note additional task consumers can be added for load balancing.
The queue values can be strings, however, if they are to be used in trigger expressions, they must be convertible to integers.
Code Block |
---|
suite test_queue
family f1
queue q1 red orange yellow green blue indigo violet
task t
endfamily
endsuite |