Show More
@@ -223,7 +223,6 b' class TaskScheduler(SessionFactory):' | |||
|
223 | 223 | except KeyError: |
|
224 | 224 | self.log.error("task::Invalid notification msg: %r"%msg) |
|
225 | 225 | |
|
226 | @logged | |
|
227 | 226 | def _register_engine(self, uid): |
|
228 | 227 | """New engine with ident `uid` became available.""" |
|
229 | 228 | # head of the line: |
@@ -322,15 +321,19 b' class TaskScheduler(SessionFactory):' | |||
|
322 | 321 | self.retries[msg_id] = retries |
|
323 | 322 | |
|
324 | 323 | # time dependencies |
|
325 |
after = |
|
|
326 |
if after |
|
|
327 | if after.success: | |
|
328 | after.difference_update(self.all_completed) | |
|
329 |
if after. |
|
|
330 |
after.difference |
|
|
331 | if after.check(self.all_completed, self.all_failed): | |
|
332 | # recast as empty set, if `after` already met, | |
|
333 | # to prevent unnecessary set comparisons | |
|
324 | after = header.get('after', None) | |
|
325 | if after: | |
|
326 | after = Dependency(after) | |
|
327 | if after.all: | |
|
328 | if after.success: | |
|
329 | after = after.difference(self.all_completed) | |
|
330 | if after.failure: | |
|
331 | after = after.difference(self.all_failed) | |
|
332 | if after.check(self.all_completed, self.all_failed): | |
|
333 | # recast as empty set, if `after` already met, | |
|
334 | # to prevent unnecessary set comparisons | |
|
335 | after = MET | |
|
336 | else: | |
|
334 | 337 | after = MET |
|
335 | 338 | |
|
336 | 339 | # location dependencies |
@@ -345,6 +348,8 b' class TaskScheduler(SessionFactory):' | |||
|
345 | 348 | |
|
346 | 349 | # validate and reduce dependencies: |
|
347 | 350 | for dep in after,follow: |
|
351 | if not dep: # empty dependency | |
|
352 | continue | |
|
348 | 353 | # check valid: |
|
349 | 354 | if msg_id in dep or dep.difference(self.all_ids): |
|
350 | 355 | self.depending[msg_id] = args |
General Comments 0
You need to be logged in to leave comments.
Login now