Skip to content

Commit

Permalink
module docstrings added
Browse files Browse the repository at this point in the history
  • Loading branch information
iamnovichek committed Oct 25, 2024
1 parent 80af015 commit 05d15b7
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
21 changes: 21 additions & 0 deletions spotnet_tracker/celery_config.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
"""
This module configures the Celery application for the project.
It sets up the Celery instance using Redis as both the message broker
and result backend. The Redis connection details (host and port) are
loaded from environment variables using the `dotenv` library.
Additionally, this module defines a scheduled task configuration that
periodically executes scheduled tasks.
Key Components:
- Loads environment variables using `load_dotenv`.
- Configures Redis connection settings for Celery.
- Defines a Celery beat schedule for recurring tasks.
Usage:
- The Celery app can be imported and used in other parts of the application
to execute tasks or manage workers.
"""

import os

from celery import Celery
Expand Down
10 changes: 10 additions & 0 deletions spotnet_tracker/tasks.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
"""
This module contains Celery tasks for the application.
It imports the logging module to facilitate logging operations and the
Celery app instance from the `celery_config` module.
Tasks:
- test_task: A simple test task that logs a confirmation message.
"""

import logging

from .celery_config import app
Expand Down

0 comments on commit 05d15b7

Please sign in to comment.