Exemple #1
0
        def get(self):
            @celery_application.task(queue=celery_application.namespace)
            def fetch_the_answer():
                return [{"status2": "why not2", "foo2": "bar2"}]

            celery_task = fetch_the_answer.apply_async()
            return flasynk.how_to_get_asynchronous_status(celery_task)
Exemple #2
0
        def get(self):
            @celery_application.task(queue=celery_application.namespace)
            def fetch_the_answer():
                raise Exception("Celery task exception")

            celery_task = fetch_the_answer.apply_async()
            return flasynk.how_to_get_asynchronous_status(celery_task)
Exemple #3
0
        def get(self):
            @celery_application.task(queue=celery_application.namespace)
            def fetch_the_answer():
                return "a;b;c"

            celery_task = fetch_the_answer.apply_async()
            return flasynk.how_to_get_asynchronous_status(celery_task)
Exemple #4
0
        def get(self):
            @huey_application.task()
            def TestEndpointModifiedTaskResult_fetch_the_answer():
                return 3

            celery_task = TestEndpointModifiedTaskResult_fetch_the_answer()
            return flasynk.how_to_get_asynchronous_status(celery_task)
Exemple #5
0
        def get(self):
            @huey_application.task()
            def TestEndpoint2_fetch_the_answer():
                return [{"status2": "why not2", "foo2": "bar2"}]

            celery_task = TestEndpoint2_fetch_the_answer()
            return flasynk.how_to_get_asynchronous_status(celery_task)
Exemple #6
0
        def get(self, str_value, int_value):
            @huey_application.task()
            def TestEndpointWithPathParameter_fetch_the_answer():
                return 3

            celery_task = TestEndpointWithPathParameter_fetch_the_answer()
            return flasynk.how_to_get_asynchronous_status(celery_task)
Exemple #7
0
        def get(self):
            @huey_application.task()
            def TestEndpointNoSerialization_fetch_the_answer():
                return "a;b;c"

            celery_task = TestEndpointNoSerialization_fetch_the_answer()
            return flasynk.how_to_get_asynchronous_status(celery_task)
Exemple #8
0
        def get(self):
            @huey_application.task()
            def TestCustomEndpointException_fetch_the_answer():
                raise CustomException("Custom exception")

            celery_task = TestCustomEndpointException_fetch_the_answer()
            return flasynk.how_to_get_asynchronous_status(celery_task)
        def get(self):
            @celery_application.task(queue=celery_application.namespace)
            def fetch_the_answer():
                return make_response("a;b;c", 200,
                                     {"Content-type": "text/csv"})

            celery_task = fetch_the_answer.apply_async()
            return flasynk.how_to_get_asynchronous_status(celery_task)
Exemple #10
0
        def get(self, str_value, int_value):
            @celery_application.task(queue=celery_application.namespace)
            def fetch_the_answer(d, l, s, t, dt):
                return 3

            celery_task = fetch_the_answer.apply_async(
                args=(dict(), list(), set(), tuple(), datetime.datetime.utcnow())
            )
            return flasynk.how_to_get_asynchronous_status(celery_task)
Exemple #11
0
    def get_async_status_with_original_request_uri():
        class HueyTaskStub:
            id = "idtest"

        huey_task = HueyTaskStub()
        return flasynk.how_to_get_asynchronous_status(huey_task)
Exemple #12
0
    def get_async_status():
        class HueyTaskStub:
            id = "idtest"

        huey_task = HueyTaskStub()
        return flasynk.how_to_get_asynchronous_status(huey_task)
Exemple #13
0
    def get_async_status():
        class CeleryTaskStub:
            id = "idtest"

        celery_task = CeleryTaskStub()
        return flasynk.how_to_get_asynchronous_status(celery_task)