Skip to content

Commit

Permalink
Merge branch 'main' into gio/fix-archive-field-cache
Browse files Browse the repository at this point in the history
  • Loading branch information
giovanni-guidini committed Aug 11, 2023
2 parents 37a31fc + 3ee8958 commit 1558f14
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion tasks/tests/unit/test_trial_expiration_cron.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from database.enums import TrialStatus
from database.tests.factories.core import OwnerFactory
from services.billing import BillingPlan
from tasks.trial_expiration import TrialExpirationTask
from tasks.trial_expiration_cron import TrialExpirationCronTask


Expand Down
2 changes: 2 additions & 0 deletions tasks/trial_expiration_cron.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from database.enums import TrialStatus
from database.models.core import Owner
from helpers.clock import get_utc_now
from services.billing import BillingPlan
from tasks.crontasks import CodecovCronTask

log = logging.getLogger(__name__)
Expand All @@ -26,6 +27,7 @@ async def run_cron_task(self, db_session, *args, **kwargs):
ongoing_trial_owners_that_should_be_expired = (
db_session.query(Owner.ownerid)
.filter(
Owner.plan == BillingPlan.users_trial.value,
Owner.trial_status == TrialStatus.ONGOING.value,
Owner.trial_end_date <= now,
)
Expand Down

0 comments on commit 1558f14

Please sign in to comment.