示例#1
0
def ping():
    """Test if the server is alive.

    Example:

        >>> from celery.task import ping
        >>> ping()
        'pong'
    """
    return PingTask.apply_async().get()
示例#2
0
文件: __init__.py 项目: 66laps/celery
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()
示例#3
0
文件: __init__.py 项目: jokar/minion
def ping():
    """Test if the server is alive.

    Example:

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