Skip to content

Commit

Permalink
Merge pull request #2562 from chaoss/fix-wrong-task-baseclass
Browse files Browse the repository at this point in the history
Fix Wrong Base Classes for Celery Tasks
  • Loading branch information
ABrain7710 authored Oct 26, 2023
2 parents 9c8c727 + 6680f49 commit 33a1e5b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions augur/tasks/git/dependency_tasks/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from augur.application.db.session import DatabaseSession
from augur.tasks.git.dependency_tasks.core import *
from augur.tasks.init.celery_app import celery_app as celery
from augur.tasks.init.celery_app import AugurFacadeRepoCollectionTask, AugurCoreRepoCollectionTask
from augur.tasks.init.celery_app import AugurFacadeRepoCollectionTask, AugurCoreRepoCollectionTask, AugurSecondaryRepoCollectionTask
from augur.application.db.util import execute_session_query
from augur.tasks.git.util.facade_worker.facade_worker.utilitymethods import get_absolute_repo_path
from augur.application.config import AugurConfig
Expand Down Expand Up @@ -33,7 +33,7 @@ def process_dependency_metrics(repo_git):
generate_deps_data(session,repo.repo_id,absolute_repo_path)


@celery.task(base=AugurCoreRepoCollectionTask)
@celery.task(base=AugurSecondaryRepoCollectionTask)
def process_ossf_dependency_metrics(repo_git):
from augur.tasks.init.celery_app import engine

Expand Down
4 changes: 2 additions & 2 deletions augur/tasks/git/facade_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ def clone_repos():
# with FacadeSession(logger) as session:
# check_for_repo_updates(session, repo_git)

@celery.task
@celery.task(base=AugurFacadeRepoCollectionTask)
def git_update_commit_count_weight(repo_git):

from augur.tasks.init.celery_app import engine
Expand All @@ -410,7 +410,7 @@ def git_update_commit_count_weight(repo_git):
update_facade_scheduling_fields(session, repo_git, facade_weight, commit_count)


@celery.task
@celery.task(base=AugurFacadeRepoCollectionTask)
def git_repo_updates_facade_task(repo_git):

logger = logging.getLogger(git_repo_updates_facade_task.__name__)
Expand Down
3 changes: 2 additions & 1 deletion augur/tasks/github/facade_github/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@


from augur.tasks.init.celery_app import celery_app as celery
from augur.tasks.init.celery_app import AugurFacadeRepoCollectionTask
from augur.tasks.github.util.github_paginator import GithubPaginator, hit_api, retrieve_dict_from_endpoint
from augur.tasks.github.util.github_task_session import GithubTaskSession, GithubTaskManifest
from augur.tasks.github.util.util import get_owner_repo
Expand Down Expand Up @@ -198,7 +199,7 @@ def link_commits_to_contributor(session,contributorQueue):


# Update the contributors table from the data facade has gathered.
@celery.task
@celery.task(base=AugurFacadeRepoCollectionTask)
def insert_facade_contributors(repo_id):

from augur.tasks.init.celery_app import engine
Expand Down

0 comments on commit 33a1e5b

Please sign in to comment.