From a8c046e7f07e283bcade549b68d9dec9df5d09a0 Mon Sep 17 00:00:00 2001 From: abram axel booth Date: Fri, 22 Nov 2024 12:29:13 -0500 Subject: [PATCH] fix: invoke followup task correctly --- osf/metrics/reporters/public_item_usage.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/osf/metrics/reporters/public_item_usage.py b/osf/metrics/reporters/public_item_usage.py index 42c53099587..cc401d50bd7 100644 --- a/osf/metrics/reporters/public_item_usage.py +++ b/osf/metrics/reporters/public_item_usage.py @@ -75,13 +75,15 @@ def report(self, **report_kwargs): return None def followup_task(self, report): - _is_last_month = report.yearmonth.next() == YearMonth.from_date(datetime.date.today()) + _is_last_month = report.report_yearmonth.next() == YearMonth.from_date(datetime.date.today()) if _is_last_month: from api.share.utils import task__update_share - return task__update_share.s( - report.item_osfid, - is_backfill=True, - osfmap_partition_name=OsfmapPartition.MONTHLY_SUPPLEMENT.name, + return task__update_share.signature( + args=(report.item_osfid,), + kwargs={ + 'is_backfill': True, + 'osfmap_partition_name': OsfmapPartition.MONTHLY_SUPPLEMENT.name, + }, countdown=30, # give index time to settle )