Skip to content

Commit

Permalink
session cleaning and stripe settings
Browse files Browse the repository at this point in the history
  • Loading branch information
ramibch committed Jan 2, 2024
1 parent fca507f commit e8bc6e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,8 @@

# Stripe
STRIPE_LIVE_MODE = os.environ.get("STRIPE_LIVE_MODE", "") == "1"
STRIPE_LIVE_SECRET_KEY = os.environ.get("STRIPE_LIVE_SECRET_KEY", "")
STRIPE_TEST_SECRET_KEY = os.environ.get("STRIPE_TEST_SECRET_KEY", "")
# STRIPE_LIVE_SECRET_KEY = os.environ.get("STRIPE_LIVE_SECRET_KEY", "")
# STRIPE_TEST_SECRET_KEY = os.environ.get("STRIPE_TEST_SECRET_KEY", "")
DJSTRIPE_WEBHOOK_SECRET = os.environ.get("DJSTRIPE_WEBHOOK_SECRET", "")
DJSTRIPE_USE_NATIVE_JSONFIELD = True
DJSTRIPE_FOREIGN_KEY_TO_FIELD = "id"
Expand Down
5 changes: 5 additions & 0 deletions core/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,8 @@ def remove_temporal_profiles():
fullname__isnull=True,
email__isnull=True,
).delete()


@db_periodic_task(crontab(hour="0", minute="20"))
def remove_expired_sessions():
call_command("clearsessions")

0 comments on commit e8bc6e9

Please sign in to comment.