|
38 | 38 | build_auth_revoke_refresh_token_by_refresh_token_request,
|
39 | 39 | build_auth_userinfo_request,
|
40 | 40 | build_config_serve_config_request,
|
41 |
| - build_jobs_add_heartbeat_request, |
42 | 41 | build_jobs_assign_sandbox_to_job_request,
|
43 | 42 | build_jobs_get_job_sandbox_request,
|
44 | 43 | build_jobs_get_job_sandboxes_request,
|
@@ -1580,123 +1579,6 @@ async def set_job_statuses(
|
1580 | 1579 |
|
1581 | 1580 | return deserialized # type: ignore
|
1582 | 1581 |
|
1583 |
| - @overload |
1584 |
| - async def add_heartbeat( |
1585 |
| - self, body: Dict[str, _models.HeartbeatData], *, content_type: str = "application/json", **kwargs: Any |
1586 |
| - ) -> List[_models.JobCommand]: |
1587 |
| - """Add Heartbeat. |
1588 |
| -
|
1589 |
| - Register a heartbeat from the job. |
1590 |
| -
|
1591 |
| - This endpoint is used by the JobAgent to send heartbeats to the WMS and to |
1592 |
| - receive job commands from the WMS. It also results in stalled jobs being |
1593 |
| - restored to the RUNNING status. |
1594 |
| -
|
1595 |
| - The ``data`` parameter and return value are mappings keyed by job ID. |
1596 |
| -
|
1597 |
| - :param body: Required. |
1598 |
| - :type body: dict[str, ~_generated.models.HeartbeatData] |
1599 |
| - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. |
1600 |
| - Default value is "application/json". |
1601 |
| - :paramtype content_type: str |
1602 |
| - :return: list of JobCommand |
1603 |
| - :rtype: list[~_generated.models.JobCommand] |
1604 |
| - :raises ~azure.core.exceptions.HttpResponseError: |
1605 |
| - """ |
1606 |
| - |
1607 |
| - @overload |
1608 |
| - async def add_heartbeat( |
1609 |
| - self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any |
1610 |
| - ) -> List[_models.JobCommand]: |
1611 |
| - """Add Heartbeat. |
1612 |
| -
|
1613 |
| - Register a heartbeat from the job. |
1614 |
| -
|
1615 |
| - This endpoint is used by the JobAgent to send heartbeats to the WMS and to |
1616 |
| - receive job commands from the WMS. It also results in stalled jobs being |
1617 |
| - restored to the RUNNING status. |
1618 |
| -
|
1619 |
| - The ``data`` parameter and return value are mappings keyed by job ID. |
1620 |
| -
|
1621 |
| - :param body: Required. |
1622 |
| - :type body: IO[bytes] |
1623 |
| - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. |
1624 |
| - Default value is "application/json". |
1625 |
| - :paramtype content_type: str |
1626 |
| - :return: list of JobCommand |
1627 |
| - :rtype: list[~_generated.models.JobCommand] |
1628 |
| - :raises ~azure.core.exceptions.HttpResponseError: |
1629 |
| - """ |
1630 |
| - |
1631 |
| - @distributed_trace_async |
1632 |
| - async def add_heartbeat( |
1633 |
| - self, body: Union[Dict[str, _models.HeartbeatData], IO[bytes]], **kwargs: Any |
1634 |
| - ) -> List[_models.JobCommand]: |
1635 |
| - """Add Heartbeat. |
1636 |
| -
|
1637 |
| - Register a heartbeat from the job. |
1638 |
| -
|
1639 |
| - This endpoint is used by the JobAgent to send heartbeats to the WMS and to |
1640 |
| - receive job commands from the WMS. It also results in stalled jobs being |
1641 |
| - restored to the RUNNING status. |
1642 |
| -
|
1643 |
| - The ``data`` parameter and return value are mappings keyed by job ID. |
1644 |
| -
|
1645 |
| - :param body: Is either a {str: HeartbeatData} type or a IO[bytes] type. Required. |
1646 |
| - :type body: dict[str, ~_generated.models.HeartbeatData] or IO[bytes] |
1647 |
| - :return: list of JobCommand |
1648 |
| - :rtype: list[~_generated.models.JobCommand] |
1649 |
| - :raises ~azure.core.exceptions.HttpResponseError: |
1650 |
| - """ |
1651 |
| - error_map: MutableMapping = { |
1652 |
| - 401: ClientAuthenticationError, |
1653 |
| - 404: ResourceNotFoundError, |
1654 |
| - 409: ResourceExistsError, |
1655 |
| - 304: ResourceNotModifiedError, |
1656 |
| - } |
1657 |
| - error_map.update(kwargs.pop("error_map", {}) or {}) |
1658 |
| - |
1659 |
| - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) |
1660 |
| - _params = kwargs.pop("params", {}) or {} |
1661 |
| - |
1662 |
| - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) |
1663 |
| - cls: ClsType[List[_models.JobCommand]] = kwargs.pop("cls", None) |
1664 |
| - |
1665 |
| - content_type = content_type or "application/json" |
1666 |
| - _json = None |
1667 |
| - _content = None |
1668 |
| - if isinstance(body, (IOBase, bytes)): |
1669 |
| - _content = body |
1670 |
| - else: |
1671 |
| - _json = self._serialize.body(body, "{HeartbeatData}") |
1672 |
| - |
1673 |
| - _request = build_jobs_add_heartbeat_request( |
1674 |
| - content_type=content_type, |
1675 |
| - json=_json, |
1676 |
| - content=_content, |
1677 |
| - headers=_headers, |
1678 |
| - params=_params, |
1679 |
| - ) |
1680 |
| - _request.url = self._client.format_url(_request.url) |
1681 |
| - |
1682 |
| - _stream = False |
1683 |
| - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access |
1684 |
| - _request, stream=_stream, **kwargs |
1685 |
| - ) |
1686 |
| - |
1687 |
| - response = pipeline_response.http_response |
1688 |
| - |
1689 |
| - if response.status_code not in [200]: |
1690 |
| - map_error(status_code=response.status_code, response=response, error_map=error_map) |
1691 |
| - raise HttpResponseError(response=response) |
1692 |
| - |
1693 |
| - deserialized = self._deserialize("[JobCommand]", pipeline_response.http_response) |
1694 |
| - |
1695 |
| - if cls: |
1696 |
| - return cls(pipeline_response, deserialized, {}) # type: ignore |
1697 |
| - |
1698 |
| - return deserialized # type: ignore |
1699 |
| - |
1700 | 1582 | @distributed_trace_async
|
1701 | 1583 | async def reschedule_jobs(self, *, job_ids: List[int], reset_jobs: bool = False, **kwargs: Any) -> Dict[str, Any]:
|
1702 | 1584 | """Reschedule Jobs.
|
|
0 commit comments