Important
*Release removed from PyPI due to issue fixed in 0.5.1*
Enhancements
- You can now specify the total number of items and the number of items processed with success and failure by each of your tasks when reporting its finish status using the `maestro.finish_task` method. by hhslepicka in https://github.com/botcity-dev/botcity-maestro-sdk-python/pull/32 and https://github.com/botcity-dev/botcity-maestro-sdk-python/pull/33.
This enhancement is strongly recommended as it will be a key aspect of the future features of the BotCity Orchestrator related to ROI, savings, and FTEs.
Here is how you can modify your code to report your items:
python
Import for integration with BotCity Maestro SDK
from botcity.maestro import *
def main():
...
maestro.finish_task(
task_id=execution.id,
status=AutomationTaskFinishStatus.SUCCESS,
message="Task Finished with Success.",
total_items=10,
processed_items=6,
failed_items=4
)
...
- Added a new option `MOCK_OBJECT_WHEN_DISCONNECTED` to return instances of the expected object when running the code disconnected from the orchestrator by hhslepicka in https://github.com/botcity-dev/botcity-maestro-sdk-python/pull/31
Before this option, the SDK would return `None` or a stub function which would make code like the example below crash.
python
Import for integration with BotCity Maestro SDK
from botcity.maestro import *
Disable errors if we are not connected to Maestro
BotMaestroSDK.RAISE_NOT_CONNECTED = False
Opt-in to receive mock objects when not connected to Maestro
BotMaestroSDK.MOCK_OBJECT_WHEN_DISCONNECTED = True
def main():
maestro = BotMaestroSDK()
maestro.from_sys_args()
task = maestro.get_task("12345")
print("Maestro Task: ", task)
print("Task Interrupted: ", task.is_interrupted())
if __name__ == '__main__':
main()
This will generate the following output:
Maestro Task: AutomationTask(id=0, state=<AutomationTaskState.START: 'START'>, parameters=None, input_file=None, activity_id=0, activity_label=None, agent_id=0, user_creation_id=0, user_creation_name=None, org_creation_id=0, date_creation=None, date_last_modified=None, finish_status=<AutomationTaskFinishStatus.FAILED: 'FAILED'>, finish_message=None, test=False, interrupted=False, killed=False, machine_id=None)
Task Interrupted: False
Bug Fixes
- Addressed an issue where the `VERIFY_SSL_CERT` flag was not being used when making requests by hhslepicka in https://github.com/botcity-dev/botcity-maestro-sdk-python/pull/30
- Addressed an issue where the `timeout` value was not properly propagated when configured
**Deprecations**
- Removed compatibility layer with BotCity Orchestrator API v1 which is no longer available in any of our servers by hhslepicka in https://github.com/botcity-dev/botcity-maestro-sdk-python/pull/28
CI
- Updated actions versions and add needs authorize to tests. by hhslepicka in https://github.com/botcity-dev/botcity-maestro-sdk-python/pull/29
**Full Changelog**: https://github.com/botcity-dev/botcity-maestro-sdk-python/compare/v0.4.2...v0.5.0