adding Poll condition to guarantee minimum time between tries

This commit is contained in:
Lourenço Vales
2025-10-05 10:39:47 +02:00
parent 8b30f7bd3d
commit 3e153f7f44

View File

@@ -117,8 +117,8 @@ func (obj *CloudflareDNSRes) Validate() error {
return fmt.Errorf("content is required when state is 'exists'")
}
if obj.MetaParams().Poll == 0 {
return fmt.Errorf("cloudflare:dns requiers polling, set Meta:poll param (e.g., 60 seconds)")
if obj.MetaParams().Poll == 0 || obj.MetaParams().Poll < 1 {
return fmt.Errorf("cloudflare:dns requiers polling, set Meta:poll param (e.g., 60 seconds), min. 1s")
}
return nil