"""
sentry.tasks.post_process
~~~~~~~~~~~~~~~~~~~~~~~~~

:copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""

from celery.task import task
from sentry.plugins import plugins
from sentry.utils.safe import safe_execute
from sentry.utils.queue import maybe_delay


@task(ignore_result=True)
def post_process_group(group, **kwargs):
    """
    Fires post processing hooks for a group.
    """
    for plugin in plugins.all():
        if safe_execute(plugin.is_enabled, group.project):
            maybe_delay(plugin_post_process_group,
                plugin.slug, group=group, **kwargs)


@task(ignore_result=True)
def plugin_post_process_group(plugin_slug, group, **kwargs):
    """
    Fires post processing hooks for a group.
    """
    plugin = plugins.get(plugin_slug)
    safe_execute(plugin.post_process, group=group, **kwargs)

@@ -348,24 +348,39 @@
 _result=True
+, time_limit=15
 )%0Adef post_p
@@ -587,16 +587,33 @@
 e_delay(
+%0A                
 plugin_p
@@ -630,32 +630,16 @@
 s_group,
-%0A               
  plugin.
@@ -693,16 +693,30 @@
 ult=True
+, time_limit=5
 )%0Adef pl

Set time limits on post_process_group and plugin_post_process_group