Metadata-Version: 2.4
Name: cronradar-celery
Version: 0.0.5
Summary: Automatic monitoring for Celery periodic tasks. Monitor selective tasks or all tasks with auto-discovery.
Home-page: https://github.com/cronradar/cronradar-celery
Author: Administrator
Author-email: contact@cronradar.com
License: Proprietary
Project-URL: Documentation, https://cronradar.com/docs
Project-URL: Source, https://github.com/cronradar/cronradar-celery
Project-URL: Tracker, https://github.com/cronradar/cronradar-celery/issues
Keywords: celery monitoring cron task beat periodic auto-discovery cronradar
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Monitoring
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: cronradar>=0.0.5
Requires-Dist: celery>=5.0.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: project-url
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# CronRadar Celery Integration

Monitor Celery periodic tasks. Auto-discover Beat schedules and track execution. Get alerts when tasks fail or don't run on schedule.

## Installation

```bash
pip install cronradar-celery
```

## Configuration

Set environment variable:
```bash
export CRONRADAR_API_KEY=ck_app_xxxxx_yyyyy
```

Get your API key from [cronradar.com/dashboard](https://cronradar.com/dashboard)

Or pass it directly:

```python
setup_cronradar(app, api_key='ck_app_xxxxx_yyyyy')
```

## Quick Start

Monitor all periodic tasks by default - use `@skip_monitor` to opt-out:

```python
from celery import Celery
from cronradar_celery import setup_cronradar, skip_monitor

app = Celery('myapp')
setup_cronradar(app)

@app.task
def send_daily_report():
    # Monitored automatically
    generate_report()

@app.task
@skip_monitor
def internal_cleanup():
    # Opted out
    pass
```

## Decorator Order (Important!)

The `@skip_monitor` decorator **must** be placed **after** `@app.task`:

```python
# ✅ Correct
@app.task
@skip_monitor
def my_task():
    pass

# ❌ Wrong - won't work
@skip_monitor
@app.task
def my_task():
    pass
```

## Requirements

- Python 3.8+
- Celery 5.0+
- cronradar 1.0+

## Links

- 📚 [Documentation](https://cronradar.com/docs/sdks/celery)
- 📦 [PyPI](https://pypi.org/project/cronradar-celery)
- 🐛 [GitHub Issues](https://github.com/cronradar/cronradar-celery/issues)
- ✉️ support@cronradar.com

## License

Proprietary - © 2025 CronRadar. All rights reserved.

See [LICENSE](./LICENSE) for details. This integration may only be used with the CronRadar monitoring service.
