Ejemplo n.º 1
0
def ping():
    """Test if the server is alive.

    Example:

        >>> from celery.task import ping
        >>> ping()
        'pong'
    """
    return PingTask.apply_async().get()
Ejemplo n.º 2
0
def ping():
    """Deprecated and scheduled for removal in Celery 2.3.

    Please use :meth:`celery.task.control.ping` instead.

    """
    warnings.warn(DeprecationWarning(
        "The ping task has been deprecated and will be removed in Celery "
        "v2.3.  Please use inspect.ping instead."))
    return PingTask.apply_async().get()
Ejemplo n.º 3
0
def ping():
    """Test if the server is alive.

    Example:

        >>> from celery.task import ping
        >>> ping()
        'pong'
    """
    return PingTask.apply_async().get()
Ejemplo n.º 4
0
 def test_ping(self):
     self.assertEqual(PingTask.apply().get(), 'pong')
Ejemplo n.º 5
0
 def test_ping(self):
     self.assertEqual(PingTask.apply().get(), 'pong')