Unit test updates for task system... remove old monkeypatch procedure

for getting job args in favor of using the job info from the database.
Can't do this anymore anyway since the job is running in another process
This commit is contained in:
Matthew Jones
2014-03-13 13:25:45 -04:00
parent fe4b4043db
commit c2950fdbdf
3 changed files with 23 additions and 32 deletions

View File

@@ -188,8 +188,9 @@ def rebuild_graph(message):
dep.status = 'waiting'
dep.save()
waiting_tasks.insert(waiting_tasks.index(task), dep)
task.status = 'waiting'
task.save()
if not hasattr(settings, 'CELERY_UNIT_TEST'):
task.status = 'waiting'
task.save()
# Rebuild graph
graph = SimpleDAG()
@@ -242,7 +243,8 @@ def process_graph(graph, task_capacity):
continue
remaining_volume -= impact
running_impact += impact
print("Started Node: %s (capacity hit: %s) Remaining Capacity: %s" % (str(node_obj), str(impact), str(remaining_volume)))
if settings.DEBUG:
print("Started Node: %s (capacity hit: %s) Remaining Capacity: %s" % (str(node_obj), str(impact), str(remaining_volume)))
def run_taskmanager(command_port):
''' Receive task start and finish signals to rebuild a dependency graph and manage the actual running of tasks '''