Web Console: allow pollPeriod to be defined in JDBC lookup config (#11193)

* allow pollPeriod to be defined in JDBC lookup config

* add test

* save the whales
This commit is contained in:
Clint Wylie 2021-05-04 00:11:26 -07:00 committed by GitHub
parent 204901a602
commit cd1ddcd36b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -416,6 +416,7 @@ describe('lookup-spec', () => {
table: 'some_lookup_table',
keyColumn: 'the_old_dim_value',
valueColumn: 'the_new_dim_value',
pollPeriod: 600000,
},
}),
).toBe(false);

View File

@ -263,7 +263,8 @@ export const LOOKUP_FIELDS: Field<LookupSpec>[] = [
name: 'extractionNamespace.pollPeriod',
type: 'string',
defaultValue: '0',
defined: (model: LookupSpec) => deepGet(model, 'extractionNamespace.type') === 'uri',
defined: (model: LookupSpec) =>
oneOf(deepGet(model, 'extractionNamespace.type'), 'uri', 'jdbc'),
info: `Period between polling for updates`,
},