Skip to content

Make status checker run on a separate thread #1818

@aarushtools

Description

@aarushtools

Feature description

Change the Ion CSL status checker (added in #1754 ) to run on a separate thread instead of the worker thread.

Rationale for adding feature

Currently, the CSL status checker will start a request to https://status.tjhsst.edu/index.json if the 5-minute cache has expired. This process can take up to 30 seconds, especially if the initial request has timed out (which happens often). Additionally, if multiple people make requests to Ion at the same time, and the cache has expired, multiple requests will be sent to that same url, causing a page hang for many users simultaneously.

Suggested implementation(s) (if applicable)

  • Use a celery task to check the status every 5 minutes with celerybeat. The cache should NOT expire every 5 minutes so that requests to Ion while the status is being updated still go through.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions