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