MCPcopy
hub / github.com/perkeep/perkeep / toggleAuto

Method toggleAuto

pkg/importer/importer.go:1164–1174  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1162}
1163
1164func (ia *importerAcct) toggleAuto() error {
1165 old := ia.acct.Attr(attrImportAuto)
1166 if old == "" && !ia.im.props.SupportsIncremental {
1167 return fmt.Errorf("Importer %q doesn't support automatic mode", ia.im.name)
1168 }
1169 var new string
1170 if old == "" {
1171 new = "30m" // TODO: configurable?
1172 }
1173 return ia.acct.SetAttrs(attrImportAuto, new)
1174}
1175
1176func (ia *importerAcct) IsAccountReady() (bool, error) {
1177 return ia.im.impl.IsAccountReady(ia.acct)

Callers 1

serveHTTPPostMethod · 0.95

Calls 2

SetAttrsMethod · 0.80
AttrMethod · 0.45

Tested by

no test coverage detected