diff --git a/CHANGELOG.md b/CHANGELOG.md index 824cc8b..cc2ec0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.9.34 (2026-05-12) + +- Support backup calendar, logs and stats. + ## 0.9.33 (2026-05-11) - Removed a deadlock that occurred when unsubscribing from an active subscription while a background thread attempted to acquire a subscription lock already held by the main subscribing thread. diff --git a/python/mujinwebstackclient/version.py b/python/mujinwebstackclient/version.py index efa7a71..01e31bd 100644 --- a/python/mujinwebstackclient/version.py +++ b/python/mujinwebstackclient/version.py @@ -1,3 +1,3 @@ -__version__ = '0.9.33' +__version__ = '0.9.34' # Do not forget to update CHANGELOG.md diff --git a/python/mujinwebstackclient/webstackclient.py b/python/mujinwebstackclient/webstackclient.py index 5828990..20179fa 100644 --- a/python/mujinwebstackclient/webstackclient.py +++ b/python/mujinwebstackclient/webstackclient.py @@ -1074,8 +1074,6 @@ def Backup( self, saveconfig=True, savemedia=True, - backupscenepks=None, - backupSceneFormat=None, savewebapps=True, saveitl=True, savedetection=False, @@ -1084,8 +1082,16 @@ def Backup( savedebug=False, saveeds=True, saveiodd=True, - saveschedule=True, - archiveFormat='tar.gz', + savecalendar=True, + logentrytimerange=None, + logentryids=None, + logtypes=None, + statentrytimerange=None, + stattypes=None, + statentryintervaltype=None, + backupscenepks=None, + backupSceneFormat=None, + archiveformat='tar.gz', timeout=600, ): """Downloads a backup file @@ -1100,10 +1106,16 @@ def Backup( :param savedebug: Whether we want to include debug files in the backup, defaults to False :param saveeds: Whether we want to include eds files in the backup, defaults to True :param saveiodd: Whether we want to include iodd files in the backup, defaults to True - :param saveschedule: Whether we want to include schedules in the backup, defaults to True + :param savecalendar: Whether we want to include the production calendar in the backup, defaults to True + :param logentrytimerange: Timestamp range for backing up log entries, defaults to None + :param logentryids: A list of log entry IDs for backing up log entries, defaults to None + :param logtypes: A list of log entry types for backing up log entries, defaults to None + :param statentrytimerange: Timestamp range for backing up stat entries, defaults to None + :param stattypes: A list of stat entry types for backing up stat entries, defaults to None + :param statentryintervaltype: Stat entry interval types for backing up stat entries, defaults to None :param backupscenepks: List of scenes to backup, defaults to None :param backupSceneFormat: The scene format to use in backup files, defaults to None - :param archiveFormat: The backup file archive format, supported values are tar.gz and zip, defaults to tar.gz + :param archiveformat: The backup file archive format, supported values are tar.gz and zip, defaults to tar.gz :param timeout: Amount of time in seconds to wait before failing, defaults to 600 :raises WebstackClientError: If request wasn't successful :return: A streaming response to the backup file @@ -1123,10 +1135,16 @@ def Backup( 'debug': 'true' if savedebug else 'false', 'eds': 'true' if saveeds else 'false', 'iodd': 'true' if saveiodd else 'false', - 'schedule': 'true' if saveschedule else 'false', + 'calendar': 'true' if savecalendar else 'false', + 'logEntryTimeRange': logentrytimerange, + 'logEntryIds': ','.join(logentryids) if logentryids else None, + 'logTypes': ','.join(logtypes) if logtypes else None, + 'statEntryTimeRange': statentrytimerange, + 'statTypes': ','.join(stattypes) if stattypes else None, + 'statEntryIntervalType': statentryintervaltype, 'backupScenePks': ','.join(backupscenepks) if backupscenepks else None, 'backupSceneFormat': backupSceneFormat, - 'archiveFormat': archiveFormat, + 'archiveFormat': archiveformat, }, timeout=timeout, ) @@ -1143,8 +1161,8 @@ def Restore( restoreitl=True, restoreeds=True, restoreiodd=True, - restoreschedule=True, - archiveFormat=None, + restorecalendar=True, + archiveformat=None, timeout=600, ): """Uploads a previously downloaded backup file to restore @@ -1156,8 +1174,8 @@ def Restore( :param restoreitl: Whether we want to restore the itl programs, defaults to True :param restoreeds: Whether we want to restore the eds files, defaults to True :param restoreiodd: Whether we want to restore the iodd files, defaults to True - :param restoreschedule: Whether we want to restore the schedules, defaults to True - :param archiveFormat: The backup file archive format, supported values are tar.gz and zip, defaults to None + :param restorecalendar: Whether we want to restore the production calendar, defaults to True + :param archiveformat: The backup file archive format, supported values are tar.gz and zip, defaults to None :param timeout: Amount of time in seconds to wait before failing, defaults to 600 :raises WebstackClientError: If request wasn't successful :return: JSON response @@ -1173,8 +1191,8 @@ def Restore( 'itl': 'true' if restoreitl else 'false', 'eds': 'true' if restoreeds else 'false', 'iodd': 'true' if restoreiodd else 'false', - 'schedule': 'true' if restoreschedule else 'false', - 'archiveFormat': archiveFormat, + 'calendar': 'true' if restorecalendar else 'false', + 'archiveFormat': archiveformat, }, timeout=timeout, )