remove todo's

This commit is contained in:
Chris Meyers
2016-10-31 09:26:27 -05:00
parent 03a484a6a6
commit 0f98e1edec

View File

@@ -108,7 +108,6 @@ class Scheduler():
return results return results
def spawn_workflow_graph_jobs(self, workflow_jobs): def spawn_workflow_graph_jobs(self, workflow_jobs):
# TODO: Consider using transaction.atomic
for workflow_job in workflow_jobs: for workflow_job in workflow_jobs:
dag = WorkflowDAG(workflow_job) dag = WorkflowDAG(workflow_job)
spawn_nodes = dag.bfs_nodes_to_run() spawn_nodes = dag.bfs_nodes_to_run()
@@ -150,9 +149,6 @@ class Scheduler():
for queue in active_task_queues: for queue in active_task_queues:
map(lambda at: active_tasks.add(at['id']), active_task_queues[queue]) map(lambda at: active_tasks.add(at['id']), active_task_queues[queue])
else: else:
logger.error("Could not communicate with celery!")
# TODO: Something needs to be done here to signal to the system
# as a whole that celery appears to be down.
if not hasattr(settings, 'CELERY_UNIT_TEST'): if not hasattr(settings, 'CELERY_UNIT_TEST'):
return None return None
@@ -163,7 +159,6 @@ class Scheduler():
status_changed = False status_changed = False
# TODO: spawn inventory and project updates
task_actual = { task_actual = {
'type':task.get_job_type_str(), 'type':task.get_job_type_str(),
'id': task['id'], 'id': task['id'],
@@ -214,7 +209,6 @@ class Scheduler():
def create_project_update(self, task): def create_project_update(self, task):
dep = Project.objects.get(id=task['project_id']).create_project_update(launch_type='dependency') dep = Project.objects.get(id=task['project_id']).create_project_update(launch_type='dependency')
# TODO: Consider using milliseconds or microseconds
# Project created 1 seconds behind # Project created 1 seconds behind
dep.created = task['created'] - timedelta(seconds=1) dep.created = task['created'] - timedelta(seconds=1)
dep.status = 'waiting' dep.status = 'waiting'
@@ -329,7 +323,6 @@ class Scheduler():
def process_tasks(self, all_sorted_tasks): def process_tasks(self, all_sorted_tasks):
# TODO: Process new tasks
running_tasks = filter(lambda t: t['status'] == 'running', all_sorted_tasks) running_tasks = filter(lambda t: t['status'] == 'running', all_sorted_tasks)
runnable_tasks = filter(lambda t: t['status'] in ['waiting', 'running'], all_sorted_tasks) runnable_tasks = filter(lambda t: t['status'] in ['waiting', 'running'], all_sorted_tasks)