diff --git a/augur/tasks/git/facade_tasks.py b/augur/tasks/git/facade_tasks.py index b7a68be542..b29b59cfbd 100644 --- a/augur/tasks/git/facade_tasks.py +++ b/augur/tasks/git/facade_tasks.py @@ -388,27 +388,6 @@ def generate_analysis_sequence(logger,repo_git, facade_helper): -def generate_contributor_sequence(logger,repo_git, session): - - contributor_sequence = [] - #all_repo_ids = [] - repo_id = None - - #contributor_sequence.append(facade_start_contrib_analysis_task.si()) - repo = get_repo_by_repo_git(repo_git) - repo_id = repo.repo_id - - #pdb.set_trace() - #breakpoint() - #for repo in all_repos: - # contributor_sequence.append(insert_facade_contributors.si(repo['repo_id'])) - #all_repo_ids = [repo['repo_id'] for repo in all_repos] - - #contrib_group = create_grouped_task_load(dataList=all_repo_ids,task=insert_facade_contributors)#group(contributor_sequence) - #contrib_group.link_error(facade_error_handler.s()) - #return contrib_group#chain(facade_start_contrib_analysis_task.si(), contrib_group) - return insert_facade_contributors.si(repo_id) - def facade_phase(repo_git, full_collection): logger = logging.getLogger(facade_phase.__name__) @@ -450,7 +429,7 @@ def facade_phase(repo_git, full_collection): #Generate contributor analysis task group. if not limited_run or (limited_run and run_facade_contributors): - facade_core_collection.append(generate_contributor_sequence(logger,repo_git,facade_helper)) + facade_core_collection.append(insert_facade_contributors.si(repo_git)) #These tasks need repos to be cloned by facade before they can work. diff --git a/augur/tasks/github/facade_github/tasks.py b/augur/tasks/github/facade_github/tasks.py index 4a3806d507..3ec4d54990 100644 --- a/augur/tasks/github/facade_github/tasks.py +++ b/augur/tasks/github/facade_github/tasks.py @@ -7,7 +7,7 @@ from augur.tasks.github.util.github_random_key_auth import GithubRandomKeyAuth from augur.application.db.models import Contributor from augur.tasks.github.facade_github.core import * -from augur.application.db.lib import execute_sql, get_contributor_aliases_by_email, get_unresolved_commit_emails_by_name, get_contributors_by_full_name +from augur.application.db.lib import execute_sql, get_contributor_aliases_by_email, get_unresolved_commit_emails_by_name, get_contributors_by_full_name, get_repo_by_repo_git from augur.tasks.git.util.facade_worker.facade_worker.facade00mainprogram import * @@ -195,10 +195,9 @@ def insert_facade_contributors(self, repo_git): # Set platform id to 1 since this task is github specific platform_id = 1 - engine = self.app.engine - logger = logging.getLogger(insert_facade_contributors.__name__) - repo_id = None + repo = get_repo_by_repo_git(repo_git) + repo_id = repo.repo_id # Get all of the commit data's emails and names from the commit table that do not appear # in the contributors table or the contributors_aliases table.