Created
May 30, 2013 23:25
-
-
Save dcramer/5682052 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import timedelta | |
from celery.task import periodic_task, task | |
from celery.task.schedules import crontab | |
from django.utils import timezone | |
from sentry.constants import MINUTE_NORMALIZATION | |
from sentry.utils import math | |
def fsteps(start, stop, steps): | |
step = (stop - start) / steps | |
while start <= stop: | |
yield start | |
start += step | |
@periodic_task( | |
name='sentry.tasks.check_alerts', | |
run_every=crontab(minute='*'), queue='alerts') | |
def check_alerts(**kwargs): | |
""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment