feat: each provider can have its own timeout
providers.azure.timeout, providers.databricks.timeout and providers.repos.timeout override providers.timeout for that provider's requests; --timeout still sets them all. lazysecrets share, which reads a key and repo files, waits the longest of them.
This commit is contained in:
11 files changed
+106
-29
No files matched your search
@@ -295,10 +295,10 @@ func (m *Model) crawlNext() tea.Cmd {
|
||||
}
|
||||
|
||||
func (m *Model) crawlCmd(job crawlJob) tea.Cmd {
|
||||
timeout := m.timeout
|
||||
if job.src != nil {
|
||||
p := m.providerFor(*job.src)
|
||||
src := *job.src
|
||||
timeout := m.timeout.of(src.Kind)
|
||||
return func() tea.Msg {
|
||||
ctx, cancel := contextWithTimeout(timeout)
|
||||
defer cancel()
|
||||
@@ -311,6 +311,7 @@ func (m *Model) crawlCmd(job crawlJob) tea.Cmd {
|
||||
}
|
||||
c := *job.container
|
||||
p := m.providerFor(c.Source)
|
||||
timeout := m.timeout.of(c.Source.Kind)
|
||||
return func() tea.Msg {
|
||||
ctx, cancel := contextWithTimeout(timeout)
|
||||
defer cancel()
|
||||
|
||||
Reference in new issue
Block a user