@celery.task
@dog_stats_api.timed('status.service.celery.pong')
def delayed_ping(value, delay):
 if (value == 'ping'):
  result = 'pong'
 else:
  result = 'got: {0}'.format(value)
 time.sleep(delay)
 return result

@ celery . task @ dog_stats_api . timed ( 'status.service.celery.pong' ) def delayed_ping ( value , delay ) : if ( value == 'ping' ) : result = 'pong' else : result = 'got: {0}' . format ( value ) time . sleep ( delay ) return result
a simple tasks that replies to a message after a especified amount of seconds .