Module: Lemans::Environments::Daytona::SdkTweaks
- Defined in:
- lib/lemans/environments/daytona/sdk_tweaks.rb
Overview
Repairs the Daytona SDK needs to be usable from a harness. Upstream ask: per-request timeouts like the Python SDK's — tracked in tmp/upstream-daytona-sdk-timeouts.md.
Defined Under Namespace
Constant Summary collapse
- GENERATED_CLIENTS =
[ ::DaytonaApiClient, ::DaytonaToolboxApiClient, ::DaytonaAnalyticsApiClient ].freeze
- HTTP_TIMEOUT_SEC =
Must clear the longest request: an exec long-polling server-side for SHORT_COMMAND_SEC. File transfers do not ride this cap — they go through the SDK's streaming API with their own TRANSFER_TIMEOUT.
Shell::SHORT_COMMAND_SEC + 30
Class Method Summary collapse
Class Method Details
.apply! ⇒ Object
38 39 40 41 42 43 44 45 46 |
# File 'lib/lemans/environments/daytona/sdk_tweaks.rb', line 38 def self.apply! GENERATED_CLIENTS.each { _1::Configuration.prepend(Deadline) } return if ENV["DEBUG_DAYTONA"] == "1" GENERATED_CLIENTS.each { _1::Configuration.prepend(Quiet) } # The same prepend seam as everything else: poking the @logger ivar # would become a silent no-op if the SDK ever renamed it. ::Daytona::Sdk.singleton_class.prepend(Quiet) end |