Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

Commit 65b9171

Browse files
committed
add task wrapper code
1 parent 3c3d300 commit 65b9171

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

tasks/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
timeseries_backfill_dataset_task,
5757
)
5858
from tasks.timeseries_delete import timeseries_delete_task
59+
from tasks.transplant_report import transplant_report_task
5960
from tasks.trial_expiration import trial_expiration_task
6061
from tasks.trial_expiration_cron import trial_expiration_cron_task
6162
from tasks.update_branches import update_branches_task_name

tasks/transplant_report.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from app import celery_app
2+
from services.report.transplant import transplant_commit_report
3+
from tasks.base import BaseCodecovTask
4+
5+
6+
class TransplantReportTask(BaseCodecovTask, name="app.tasks.reports.transplant_report"):
7+
def run_impl(self, db_session, repo_id: int, from_sha: str, to_sha: str):
8+
transplant_commit_report(repo_id, from_sha, to_sha)
9+
10+
11+
RegisteredTransplantReportTask = celery_app.register_task(TransplantReportTask())
12+
transplant_report_task = celery_app.tasks[RegisteredTransplantReportTask.name]

0 commit comments

Comments
 (0)