~launchpad-pqm/launchpad/devel

3147.5.55 by Celso Providelo
applying review comments, r=flacoste
1
= BuildQueue =
2
3
BuildQueue class represents the run-time-records of builds being
4
processed.
5
6
See buildd-queuebuilder.txt for more information about the BuildQueue
13194.2.1 by Gavin Panella
Change all uses of 'initialise' to 'initialize'.
7
initialization.
3147.5.55 by Celso Providelo
applying review comments, r=flacoste
8
9
BuildQueue should provide all the information needed for dispatching
10
and collecting build results.
11
12
As soon as a build job is processed succesfully (dispatched &
13
collected) the BuildQueue record representing it is removed.
14
14600.2.2 by Curtis Hovey
Moved webapp to lp.services.
15
    >>> from lp.services.webapp.testing import verifyObject
14513.3.18 by Raphael Badin
Fix doctest.
16
    >>> from lp.services.propertycache import get_property_cache
7675.509.139 by William Grant
Move (I)BuildQueue(Set) to lp.buildmaster.
17
    >>> from lp.buildmaster.interfaces.buildqueue import (
18
    ...     IBuildQueue, IBuildQueueSet)
3500.3.54 by Celso Providelo
gluing unrelated review comments about BuildQueue documentation, r=flacoste
19
20
Get an instance of Builder from the current sampledata using the
21
IBuildQueueSet zope utility. The zope utility itself will be
22
documented later on this document, we are only using it to retrive an
23
IBuildQueue record with the security proxies in place:
24
5152.5.12 by Celso Providelo
Workarounding race-condition when running slave-scanner and queue-builder in parallel, also improving buildqueue tests and lookup main lookup method.
25
    >>> bq = getUtility(IBuildQueueSet).get(1)
3500.3.54 by Celso Providelo
gluing unrelated review comments about BuildQueue documentation, r=flacoste
26
27
Instances returned by IBuildQueueSet provides the IBuildQueue interface:
3147.5.55 by Celso Providelo
applying review comments, r=flacoste
28
5152.5.12 by Celso Providelo
Workarounding race-condition when running slave-scanner and queue-builder in parallel, also improving buildqueue tests and lookup main lookup method.
29
    >>> verifyObject(IBuildQueue, bq)
30
    True
3147.5.55 by Celso Providelo
applying review comments, r=flacoste
31
3500.3.54 by Celso Providelo
gluing unrelated review comments about BuildQueue documentation, r=flacoste
32
The IBuild record related to this job is provided by the 'build'
33
attribute:
3147.5.55 by Celso Providelo
applying review comments, r=flacoste
34
10667.2.2 by Michael Nelson
Mass renaming of imports and references to IBuild/Build/IBuildSet
35
    >>> from lp.soyuz.interfaces.binarypackagebuild import IBinaryPackageBuildSet
36
    >>> build = getUtility(IBinaryPackageBuildSet).getByQueueEntry(bq)
7675.391.22 by Muharem Hrnjadovic
Fixed more breakage.
37
    >>> build.id
5152.5.12 by Celso Providelo
Workarounding race-condition when running slave-scanner and queue-builder in parallel, also improving buildqueue tests and lookup main lookup method.
38
    8
7675.687.143 by Michael Nelson
buildmaster.tests
39
    >>> build.status.name
5152.5.12 by Celso Providelo
Workarounding race-condition when running slave-scanner and queue-builder in parallel, also improving buildqueue tests and lookup main lookup method.
40
    'BUILDING'
3147.5.55 by Celso Providelo
applying review comments, r=flacoste
41
13194.2.1 by Gavin Panella
Change all uses of 'initialise' to 'initialize'.
42
The static timestamps, representing when the record was initialized
3500.3.54 by Celso Providelo
gluing unrelated review comments about BuildQueue documentation, r=flacoste
43
(inserted) and when the job was dispatched are provided as datetime
44
instances:
3147.5.55 by Celso Providelo
applying review comments, r=flacoste
45
7675.391.22 by Muharem Hrnjadovic
Fixed more breakage.
46
    >>> bq.job.date_created
5821.6.34 by Celso Providelo
using get_transaction_timestamp where where it is possible.
47
    datetime.datetime(2005, 6, 15, 9, 14, 12, 820778, tzinfo=<UTC>)
3147.5.55 by Celso Providelo
applying review comments, r=flacoste
48
7675.390.5 by Muharem Hrnjadovic
Review changes, round 1.
49
    >>> bq.date_started
5821.6.34 by Celso Providelo
using get_transaction_timestamp where where it is possible.
50
    datetime.datetime(2005, 6, 15, 9, 20, 12, 820778, tzinfo=<UTC>)
3147.5.55 by Celso Providelo
applying review comments, r=flacoste
51
52
Check Builder foreign key, which indicated which builder 'is processing'
53
the job in question:
54
3500.3.54 by Celso Providelo
gluing unrelated review comments about BuildQueue documentation, r=flacoste
55
The 'builder' attribute provides the IBuilder instance of the builder
56
currently processing this job:
57
5152.5.12 by Celso Providelo
Workarounding race-condition when running slave-scanner and queue-builder in parallel, also improving buildqueue tests and lookup main lookup method.
58
    >>> bq.builder.name
59
    u'bob'
3147.5.55 by Celso Providelo
applying review comments, r=flacoste
60
61
'logtail' is a text field which stores up to 1 Kbyte of the last
62
logged actions during the build process, it is updated according the
63
frequency set in buildd-slavescanner, normally 10 seconds, see
64
buildd-slavescanner.txt for further information:
65
5152.5.12 by Celso Providelo
Workarounding race-condition when running slave-scanner and queue-builder in parallel, also improving buildqueue tests and lookup main lookup method.
66
    >>> bq.logtail
67
    u'Dummy sampledata entry, not processing'
3147.5.55 by Celso Providelo
applying review comments, r=flacoste
68
69
'lastscore' is the heuristic index generated by queuebuilder to order
70
the dispatching process, see more information in
71
buildd-queuebuilder.txt:
72
5152.5.12 by Celso Providelo
Workarounding race-condition when running slave-scanner and queue-builder in parallel, also improving buildqueue tests and lookup main lookup method.
73
    >>> bq.lastscore
74
    1
3147.5.55 by Celso Providelo
applying review comments, r=flacoste
75
76
'manual' is a boolean, which is meant to suppress the auto-scoring
77
procedure, i.e., when it is set the job do not get re-scored, it is
78
used to manually reorder jobs via the web UI:
79
5152.5.12 by Celso Providelo
Workarounding race-condition when running slave-scanner and queue-builder in parallel, also improving buildqueue tests and lookup main lookup method.
80
    >>> bq.manual
81
    False
3147.5.55 by Celso Providelo
applying review comments, r=flacoste
82
3691.454.27 by Robert Collins
Delegate log file naming in the build slave scanner to the BuildQueue
83
BuildQueue provides the name for the logfile resulting from the build:
84
5152.5.12 by Celso Providelo
Workarounding race-condition when running slave-scanner and queue-builder in parallel, also improving buildqueue tests and lookup main lookup method.
85
    >>> bq.getLogFileName()
86
    u'buildlog_ubuntu-hoary-i386.mozilla-firefox_0.9_BUILDING.txt'
87
3147.5.55 by Celso Providelo
applying review comments, r=flacoste
88
BuildQueue provides a method to handle "manual scoring" procedure
89
properly, in order to retain the manually set score we need to
90
set 'manual' attribute atomically. For this we use manualScore:
91
5152.5.12 by Celso Providelo
Workarounding race-condition when running slave-scanner and queue-builder in parallel, also improving buildqueue tests and lookup main lookup method.
92
    >>> pending_bq = getUtility(IBuildQueueSet).get(2)
93
94
    >>> pending_bq.manual, pending_bq.lastscore
95
    (False, 10)
96
    >>> pending_bq.manualScore(1000)
97
98
    >>> pending_bq.manual, pending_bq.lastscore
99
    (True, 1000)
3147.5.55 by Celso Providelo
applying review comments, r=flacoste
100
101
7675.420.16 by Michael Nelson
Refactored to adapt on the job rather than the job type and added tests.
102
The BuildQueue item is responsible for providing the required build behavior
103
for the item.
104
7675.420.18 by Michael Nelson
Tidying up some stray comments.
105
    >>> from zope.security.proxy import isinstance
106
    >>> from lp.soyuz.model.binarypackagebuildbehavior import (
107
    ...     BinaryPackageBuildBehavior)
108
    >>> isinstance(bq.required_build_behavior, BinaryPackageBuildBehavior)
109
    True
7675.420.16 by Michael Nelson
Refactored to adapt on the job rather than the job type and added tests.
110
111
8137.17.24 by Barry Warsaw
thread merge
112
== Dispatching and Reseting jobs ==
113
114
The sampledata contains an active job, being built by the 'bob'
115
builder.
116
7675.450.1 by Tim Penhey
Change the import locations to reflect the moves on devel.
117
    >>> from lp.buildmaster.interfaces.builder import IBuilderSet
8137.17.24 by Barry Warsaw
thread merge
118
119
    >>> bob = getUtility(IBuilderSet)['bob']
120
    >>> job = bob.currentjob
121
122
    >>> print job.builder.name
123
    bob
7675.390.5 by Muharem Hrnjadovic
Review changes, round 1.
124
    >>> job.date_started is not None
8137.17.24 by Barry Warsaw
thread merge
125
    True
126
    >>> print job.logtail
127
    Dummy sampledata entry, not processing
10667.2.2 by Michael Nelson
Mass renaming of imports and references to IBuild/Build/IBuildSet
128
    >>> build = getUtility(IBinaryPackageBuildSet).getByQueueEntry(job)
7675.687.143 by Michael Nelson
buildmaster.tests
129
    >>> print build.status.name
8137.17.24 by Barry Warsaw
thread merge
130
    BUILDING
131
    >>> print job.lastscore
132
    1
133
134
IBuildQueue.reset() will reset the job, enabling it to be dispatched
135
to another build. The score value of the job is preserved.
136
137
    >>> job.reset()
138
14513.3.18 by Raphael Badin
Fix doctest.
139
    >>> del get_property_cache(bob).currentjob
8137.17.24 by Barry Warsaw
thread merge
140
    >>> print bob.currentjob
141
    None
142
143
    >>> print job.builder
144
    None
7675.390.5 by Muharem Hrnjadovic
Review changes, round 1.
145
    >>> print job.date_started
8137.17.24 by Barry Warsaw
thread merge
146
    None
147
    >>> print job.logtail
148
    None
7675.687.143 by Michael Nelson
buildmaster.tests
149
    >>> print build.status.name
8137.17.24 by Barry Warsaw
thread merge
150
    NEEDSBUILD
151
    >>> print job.lastscore
152
    1
153
154
On the flip-side, IBuildQueue.markAsBuilding() will assign the job to
155
the specified builder.
156
157
    >>> job.markAsBuilding(bob)
158
14513.3.18 by Raphael Badin
Fix doctest.
159
    >>> del get_property_cache(bob).currentjob
8137.17.24 by Barry Warsaw
thread merge
160
    >>> bob.currentjob == job
161
    True
162
163
    >>> print job.builder.name
164
    bob
7675.390.5 by Muharem Hrnjadovic
Review changes, round 1.
165
    >>> job.date_started is not None
8137.17.24 by Barry Warsaw
thread merge
166
    True
7675.687.143 by Michael Nelson
buildmaster.tests
167
    >>> print build.status.name
8137.17.24 by Barry Warsaw
thread merge
168
    BUILDING
169
170
171
== BuildQueueSet utility ==
172
3147.5.55 by Celso Providelo
applying review comments, r=flacoste
173
Now perform the tests for the BuildQueue zope utility, BuildQueueSet.
174
Check if the instance returned as utility corresponds to its
175
respective interface:
176
5152.5.12 by Celso Providelo
Workarounding race-condition when running slave-scanner and queue-builder in parallel, also improving buildqueue tests and lookup main lookup method.
177
    >>> bqset = getUtility(IBuildQueueSet)
178
    >>> verifyObject(IBuildQueueSet, bqset)
179
    True
3147.5.55 by Celso Providelo
applying review comments, r=flacoste
180
3500.3.54 by Celso Providelo
gluing unrelated review comments about BuildQueue documentation, r=flacoste
181
IBuildQueueSet utility is iterable:
3147.5.55 by Celso Providelo
applying review comments, r=flacoste
182
5152.5.12 by Celso Providelo
Workarounding race-condition when running slave-scanner and queue-builder in parallel, also improving buildqueue tests and lookup main lookup method.
183
    >>> for bq in bqset:
184
    ...     bq.id
185
    1
186
    2
3147.5.55 by Celso Providelo
applying review comments, r=flacoste
187
3500.3.54 by Celso Providelo
gluing unrelated review comments about BuildQueue documentation, r=flacoste
188
Also provides a getter:
3147.5.55 by Celso Providelo
applying review comments, r=flacoste
189
5152.5.12 by Celso Providelo
Workarounding race-condition when running slave-scanner and queue-builder in parallel, also improving buildqueue tests and lookup main lookup method.
190
    >>> bqset[1].id
191
    1
3147.5.55 by Celso Providelo
applying review comments, r=flacoste
192
3500.3.54 by Celso Providelo
gluing unrelated review comments about BuildQueue documentation, r=flacoste
193
a 'get' method:
3147.5.55 by Celso Providelo
applying review comments, r=flacoste
194
5152.5.12 by Celso Providelo
Workarounding race-condition when running slave-scanner and queue-builder in parallel, also improving buildqueue tests and lookup main lookup method.
195
    >>> bqset.get(2).id
196
    2
3147.5.55 by Celso Providelo
applying review comments, r=flacoste
197
3500.3.54 by Celso Providelo
gluing unrelated review comments about BuildQueue documentation, r=flacoste
198
and a full counter:
3147.5.55 by Celso Providelo
applying review comments, r=flacoste
199
5152.5.12 by Celso Providelo
Workarounding race-condition when running slave-scanner and queue-builder in parallel, also improving buildqueue tests and lookup main lookup method.
200
    >>> bqset.count()
201
    2
3147.5.55 by Celso Providelo
applying review comments, r=flacoste
202
3500.3.54 by Celso Providelo
gluing unrelated review comments about BuildQueue documentation, r=flacoste
203
IBuildQueueSet provides a method to retrieve the active job:
3147.5.55 by Celso Providelo
applying review comments, r=flacoste
204
5152.5.12 by Celso Providelo
Workarounding race-condition when running slave-scanner and queue-builder in parallel, also improving buildqueue tests and lookup main lookup method.
205
    >>> for bq in bqset.getActiveBuildJobs():
206
    ...     bq.id, bq.builder.name
207
    (1, u'bob')
3147.5.55 by Celso Providelo
applying review comments, r=flacoste
208
209
Another method to fetch the BuildQueue being processed for a builder,
210
there should be only one since the builders are sigle-task
211
applications:
212
5152.5.12 by Celso Providelo
Workarounding race-condition when running slave-scanner and queue-builder in parallel, also improving buildqueue tests and lookup main lookup method.
213
    >>> current_job = bqset.getByBuilder(bob)
8137.17.24 by Barry Warsaw
thread merge
214
    >>> print current_job.builder.name
215
    bob
3147.5.55 by Celso Providelo
applying review comments, r=flacoste
216
217
BuildQueueSet provides a method used in the builddmaster context to
5152.5.12 by Celso Providelo
Workarounding race-condition when running slave-scanner and queue-builder in parallel, also improving buildqueue tests and lookup main lookup method.
218
calculate retrieve every instance for a set of distroarchseriess
219
corresponding to a build record in NEEDSBUILD state.
220
221
Use all architectures available in ubuntu/hoary, i.e, i386 and hppa:
222
11692.6.2 by Curtis Hovey
Use deglober to fixing simple glob imports in doctests.
223
    >>> from lp.registry.interfaces.distribution import IDistributionSet
5152.5.12 by Celso Providelo
Workarounding race-condition when running slave-scanner and queue-builder in parallel, also improving buildqueue tests and lookup main lookup method.
224
    >>> ubuntu = getUtility(IDistributionSet)['ubuntu']
225
    >>> hoary = ubuntu['hoary']
226
    >>> archseries = [arch for arch in hoary.architectures]
227
228
Create a new Builds and corresponding BuildQueues in ubuntu/hoary/hppa
229
for testing if we will also be able to deal with more than one architecture.
230
9113.7.7 by Jonathan Lange
Update all the rest of the imports of PackagePublishingPocket.
231
    >>> from lp.registry.interfaces.pocket import (
5152.5.12 by Celso Providelo
Workarounding race-condition when running slave-scanner and queue-builder in parallel, also improving buildqueue tests and lookup main lookup method.
232
    ...     PackagePublishingPocket)
233
    >>> alsa_hoary = hoary.getSourcePackage('alsa-utils')
6665.1.11 by Bjorn Tillenius
fix test failures.
234
    >>> alsa_spr = alsa_hoary['1.0.9a-4'].sourcepackagerelease
5226.1.27 by Celso Providelo
fixing test failures.
235
    >>> print alsa_spr.title
236
    alsa-utils - 1.0.9a-4
237
5152.5.12 by Celso Providelo
Workarounding race-condition when running slave-scanner and queue-builder in parallel, also improving buildqueue tests and lookup main lookup method.
238
    >>> alsa_build = alsa_spr.createBuild(
239
    ...     hoary['hppa'], PackagePublishingPocket.RELEASE,
240
    ...     hoary.main_archive)
10130.11.12 by William Grant
Rename createBuildQueueEntry to queueBuild.
241
    >>> alsa_build.queueBuild().lastscore = 500
5152.5.12 by Celso Providelo
Workarounding race-condition when running slave-scanner and queue-builder in parallel, also improving buildqueue tests and lookup main lookup method.
242
243
    >>> pmount_hoary = hoary.getSourcePackage('pmount')
244
    >>> pmount_spr = pmount_hoary.currentrelease.sourcepackagerelease
5226.1.27 by Celso Providelo
fixing test failures.
245
    >>> print pmount_spr.title
246
    pmount - 0.1-2
247
5152.5.12 by Celso Providelo
Workarounding race-condition when running slave-scanner and queue-builder in parallel, also improving buildqueue tests and lookup main lookup method.
248
    >>> pmount_build = pmount_spr.createBuild(
249
    ...     hoary['hppa'], PackagePublishingPocket.RELEASE,
250
    ...     hoary.main_archive)
10130.11.12 by William Grant
Rename createBuildQueueEntry to queueBuild.
251
    >>> pmount_build.queueBuild().lastscore = 1500
5152.5.12 by Celso Providelo
Workarounding race-condition when running slave-scanner and queue-builder in parallel, also improving buildqueue tests and lookup main lookup method.
252
253
Materialize the changes in database:
254
14606.3.1 by William Grant
Merge canonical.database into lp.services.database.
255
    >>> from lp.services.database.sqlbase import flush_database_updates
5152.5.12 by Celso Providelo
Workarounding race-condition when running slave-scanner and queue-builder in parallel, also improving buildqueue tests and lookup main lookup method.
256
    >>> flush_database_updates()
257
258
Note that the results are ordered by descending BuildQueue.lastscore
259
and restricted
260
10667.2.2 by Michael Nelson
Mass renaming of imports and references to IBuild/Build/IBuildSet
261
    >>> for bq in getUtility(IBinaryPackageBuildSet).calculateCandidates(archseries):
262
    ...     build = getUtility(IBinaryPackageBuildSet).getByQueueEntry(bq)
5152.5.12 by Celso Providelo
Workarounding race-condition when running slave-scanner and queue-builder in parallel, also improving buildqueue tests and lookup main lookup method.
263
    ...     print "%s (%s, %d)" % (build.title, bq.lastscore, bq.id)
264
    hppa build of pmount 0.1-2 in ubuntu hoary RELEASE (1500, 4)
265
    i386 build of alsa-utils 1.0.9a-4ubuntu1 in ubuntu hoary RELEASE (1000, 2)
5226.1.27 by Celso Providelo
fixing test failures.
266
    hppa build of alsa-utils 1.0.9a-4 in ubuntu hoary RELEASE (500, 3)
5152.5.12 by Celso Providelo
Workarounding race-condition when running slave-scanner and queue-builder in parallel, also improving buildqueue tests and lookup main lookup method.
267
6251.1.2 by Muharem Hrnjadovic
review comments
268
Language packs will have a score of zero so they are processed
269
after other packages in the queue. First we need to create a fake
270
language pack build.
6251.1.1 by Muharem Hrnjadovic
lang pack scoring fixed
271
272
    >>> from zope.security.proxy import removeSecurityProxy
11692.6.2 by Curtis Hovey
Use deglober to fixing simple glob imports in doctests.
273
    >>> from lp.soyuz.interfaces.section import ISectionSet
6251.1.1 by Muharem Hrnjadovic
lang pack scoring fixed
274
    >>> section_set = getUtility(ISectionSet)
275
    >>> [transl_section] = [s for s in section_set
276
    ...     if s.name == u'translations']
277
    >>> na_hoary = hoary.getSourcePackage('netapplet')
278
    >>> na_spr = removeSecurityProxy(
279
    ...     na_hoary.currentrelease.sourcepackagerelease)
280
    >>> na_spr.section = transl_section
281
282
The build score for the fake language pack is zero.
283
284
    >>> na_build = na_spr.createBuild(
285
    ...     hoary['i386'], PackagePublishingPocket.RELEASE,
286
    ...     hoary.main_archive)
10130.11.12 by William Grant
Rename createBuildQueueEntry to queueBuild.
287
    >>> na_build.queueBuild().lastscore
6251.1.1 by Muharem Hrnjadovic
lang pack scoring fixed
288
    0
289
6251.1.2 by Muharem Hrnjadovic
review comments
290
The fake language pack will be queued behind the other source packages
291
as intended.
6251.1.1 by Muharem Hrnjadovic
lang pack scoring fixed
292
10667.2.2 by Michael Nelson
Mass renaming of imports and references to IBuild/Build/IBuildSet
293
    >>> for bq in getUtility(IBinaryPackageBuildSet).calculateCandidates(archseries):
294
    ...     build = getUtility(IBinaryPackageBuildSet).getByQueueEntry(bq)
6251.1.1 by Muharem Hrnjadovic
lang pack scoring fixed
295
    ...     print "%s (%s, %d)" % (build.title, bq.lastscore, bq.id)
296
    hppa build of pmount 0.1-2 in ubuntu hoary RELEASE (1500, 4)
297
    i386 build of alsa-utils 1.0.9a-4ubuntu1 in ubuntu hoary RELEASE (1000, 2)
298
    hppa build of alsa-utils 1.0.9a-4 in ubuntu hoary RELEASE (500, 3)
299
    i386 build of netapplet 1.0-1 in ubuntu hoary RELEASE (0, 5)
300
6285.1.7 by Muharem Hrnjadovic
reverted changes to lib/canonical/launchpad/doc/buildqueue.txt
301
5152.5.12 by Celso Providelo
Workarounding race-condition when running slave-scanner and queue-builder in parallel, also improving buildqueue tests and lookup main lookup method.
302
Restricting the domain to only hoary/hppa:
303
304
    >>> archseries = [hoary['hppa']]
10667.2.2 by Michael Nelson
Mass renaming of imports and references to IBuild/Build/IBuildSet
305
    >>> for bq in getUtility(IBinaryPackageBuildSet).calculateCandidates(archseries):
306
    ...     build = getUtility(IBinaryPackageBuildSet).getByQueueEntry(bq)
5152.5.12 by Celso Providelo
Workarounding race-condition when running slave-scanner and queue-builder in parallel, also improving buildqueue tests and lookup main lookup method.
307
    ...     print "%s (%s, %d)" % (build.title, bq.lastscore, bq.id)
308
    hppa build of pmount 0.1-2 in ubuntu hoary RELEASE (1500, 4)
5226.1.27 by Celso Providelo
fixing test failures.
309
    hppa build of alsa-utils 1.0.9a-4 in ubuntu hoary RELEASE (500, 3)
5152.5.12 by Celso Providelo
Workarounding race-condition when running slave-scanner and queue-builder in parallel, also improving buildqueue tests and lookup main lookup method.
310
311
This method asserts a valid 'archseries' argument, None or an empty
312
list will result in a AssertionFailure.
313
10667.2.2 by Michael Nelson
Mass renaming of imports and references to IBuild/Build/IBuildSet
314
    >>> getUtility(IBinaryPackageBuildSet).calculateCandidates(None).count()
5152.5.12 by Celso Providelo
Workarounding race-condition when running slave-scanner and queue-builder in parallel, also improving buildqueue tests and lookup main lookup method.
315
    Traceback (most recent call last):
316
    ...
317
    AssertionError: Given 'archseries' cannot be None/empty.
318
10667.2.2 by Michael Nelson
Mass renaming of imports and references to IBuild/Build/IBuildSet
319
    >>> getUtility(IBinaryPackageBuildSet).calculateCandidates([]).count()
5152.5.12 by Celso Providelo
Workarounding race-condition when running slave-scanner and queue-builder in parallel, also improving buildqueue tests and lookup main lookup method.
320
    Traceback (most recent call last):
321
    ...
322
    AssertionError: Given 'archseries' cannot be None/empty.