コード例 #1
0
ファイル: test_result.py プロジェクト: mozilla/webifyme-lib
    def test_ready(self):
        oks = (AsyncResult(self.task1["id"]), AsyncResult(self.task2["id"]),
               AsyncResult(self.task3["id"]))
        self.assertTrue(all(result.ready() for result in oks))
        self.assertFalse(AsyncResult(self.task4["id"]).ready())

        self.assertFalse(AsyncResult(gen_unique_id()).ready())
コード例 #2
0
ファイル: test_result.py プロジェクト: andymckay/zamboni-lib
    def test_ready(self):
        oks = (AsyncResult(self.task1["id"]),
               AsyncResult(self.task2["id"]),
               AsyncResult(self.task3["id"]))
        self.assertTrue(all(result.ready() for result in oks))
        self.assertFalse(AsyncResult(self.task4["id"]).ready())

        self.assertFalse(AsyncResult(gen_unique_id()).ready())
コード例 #3
0
ファイル: result.py プロジェクト: mozilla/webifyme-lib
    def ready(self):
        """Is the task ready?

        :returns: :const:`True` if all of the tasks in the taskset has been
            executed.

        """
        return all(subtask.ready() for subtask in self.itersubtasks())
コード例 #4
0
ファイル: result.py プロジェクト: mozilla/webifyme-lib
    def successful(self):
        """Was the taskset successful?

        :returns: :const:`True` if all of the tasks in the taskset finished
            successfully (i.e. did not raise an exception).

        """
        return all(subtask.successful() for subtask in self.itersubtasks())
コード例 #5
0
ファイル: result.py プロジェクト: frac/celery
    def ready(self):
        """Is the task ready?

        :returns: :const:`True` if all of the tasks in the taskset has been
            executed.

        """
        return all(subtask.ready() for subtask in self.itersubtasks())
コード例 #6
0
ファイル: result.py プロジェクト: frac/celery
    def successful(self):
        """Was the taskset successful?

        :returns: :const:`True` if all of the tasks in the taskset finished
            successfully (i.e. did not raise an exception).

        """
        return all(subtask.successful() for subtask in self.itersubtasks())
コード例 #7
0
ファイル: result.py プロジェクト: kornholi/celery
    def ready(self):
        """Did all of the tasks complete? (either by success of failure).

        :returns: :const:`True` if all of the tasks been
            executed.

        """
        return all(result.ready() for result in self.results)
コード例 #8
0
ファイル: result.py プロジェクト: kornholi/celery
    def successful(self):
        """Was all of the tasks successful?

        :returns: :const:`True` if all of the tasks finished
            successfully (i.e. did not raise an exception).

        """
        return all(result.successful() for result in self.results)
コード例 #9
0
ファイル: buckets.py プロジェクト: berg/celery
 def empty(self):
     return all(bucket.empty() for bucket in self.buckets.values())
コード例 #10
0
ファイル: buckets.py プロジェクト: eldondev/celery
 def empty(self):
     """Returns :const:`True` if all of the buckets are empty."""
     return all(bucket.empty() for bucket in self.buckets.values())
コード例 #11
0
ファイル: buckets.py プロジェクト: mozilla/webifyme-lib
 def empty(self):
     """Returns :const:`True` if all of the buckets are empty."""
     return all(bucket.empty() for bucket in self.buckets.values())