Beispiel #1
0
 def _test_celery(self):
     print '=== CELERY ==='
     a = int(random.random()*1000)
     b = int(random.random()*1000)
     r = add.delay(a, b)
     ra, rb, s = r.get()
     print 'Execute task "add" with args: ', a, b
     assert ra == a and rb == b and s == a+b, u'Celery is unavailable'
     
     print 'OK'
     print
Beispiel #2
0
    def _test_celery(self):
        print '=== CELERY ==='
        a = int(random.random() * 1000)
        b = int(random.random() * 1000)
        r = add.delay(a, b)
        ra, rb, s = r.get()
        print 'Execute task "add" with args: ', a, b
        assert ra == a and rb == b and s == a + b, u'Celery is unavailable'

        print 'OK'
        print
Beispiel #3
0
def test_celery(request):
    from videos.tasks import add
    add.delay(1, 2)
    return HttpResponse('Hello, from Amazon SQS backend for Celery!')
Beispiel #4
0
def test_celery(request):
    from videos.tasks import add
    r = add.delay(1, 2)
    return HttpResponse('Hello, from Amazon SQS backend for Celery!')