layer1.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:cuny-bdif 作者: aristotle-tek 项目源码 文件源码
def poll_for_activity_task(self, domain, task_list, identity=None):
        """
        Used by workers to get an ActivityTask from the specified
        activity taskList. This initiates a long poll, where the
        service holds the HTTP connection open and responds as soon as
        a task becomes available. The maximum time the service holds
        on to the request before responding is 60 seconds. If no task
        is available within 60 seconds, the poll will return an empty
        result. An empty result, in this context, means that an
        ActivityTask is returned, but that the value of taskToken is
        an empty string. If a task is returned, the worker should use
        its type to identify and process it correctly.

        :type domain: string
        :param domain: The name of the domain that contains the task
            lists being polled.

        :type task_list: string
        :param task_list: Specifies the task list to poll for activity tasks.

        :type identity: string
        :param identity: Identity of the worker making the request, which
            is recorded in the ActivityTaskStarted event in the workflow
            history. This enables diagnostic tracing when problems arise.
            The form of this identity is user defined.

        :raises: UnknownResourceFault, SWFOperationNotPermittedError
        """
        return self.json_request('PollForActivityTask', {
            'domain': domain,
            'taskList': {'name': task_list},
            'identity': identity,
        })
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号