def ping(): """Test if the server is alive. Example: >>> from celery.task import ping >>> ping() 'pong' """ return PingTask.apply_async().get()
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()
def test_ping(self): self.assertEqual(PingTask.apply().get(), 'pong')