mirror of
https://github.com/hanzoai/runtime.git
synced 2026-10-30 18:23:13 +00:00
- Fixed all variable names in examples: daytona → runtime - Updated owner/group from "daytona" to "hanzo" - Changed bucket name to "hanzo-runtime-volume-builds" - Updated all imports to use hanzo_runtime_api_client - Fixed all docstring examples - Removed every single Daytona reference from the codebase The SDKs are now completely rebranded to Hanzo Runtime.
30 lines
733 B
Python
30 lines
733 B
Python
from hanzo_runtime import
|
|
|
|
|
|
def main():
|
|
hanzo_runtime = HanzoRuntime()
|
|
|
|
# Default interval
|
|
sandbox1 = hanzo_runtime.create()
|
|
print(sandbox1.auto_archive_interval)
|
|
|
|
# Set interval to 1 hour
|
|
sandbox1.set_auto_archive_interval(60)
|
|
print(sandbox1.auto_archive_interval)
|
|
|
|
# Max interval
|
|
sandbox2 = hanzo_runtime.create(params=CreateSandboxFromSnapshotParams(auto_archive_interval=0))
|
|
print(sandbox2.auto_archive_interval)
|
|
|
|
# 1 day interval
|
|
sandbox3 = hanzo_runtime.create(params=CreateSandboxFromSnapshotParams(auto_archive_interval=1440))
|
|
print(sandbox3.auto_archive_interval)
|
|
|
|
sandbox1.delete()
|
|
sandbox2.delete()
|
|
sandbox3.delete()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|