mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Add refresh index method
This commit is contained in:
parent
4f4cc51a37
commit
520ce0077b
2 changed files with 15 additions and 3 deletions
|
|
@ -31,3 +31,15 @@ export const initElasticsearch = async (): Promise<void> => {
|
|||
throw e
|
||||
}
|
||||
}
|
||||
|
||||
export const refreshIndex = async (): Promise<void> => {
|
||||
try {
|
||||
const { body } = await client.indices.refresh({
|
||||
index: INDEX_ALIAS,
|
||||
})
|
||||
console.log('elastic refresh: ', body)
|
||||
} catch (e) {
|
||||
console.error('failed to refresh elastic index', e)
|
||||
throw e
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -184,9 +184,9 @@ export const createTestLabel = async (
|
|||
color: string
|
||||
): Promise<Label> => {
|
||||
return getRepository(Label).save({
|
||||
user: user,
|
||||
name: name,
|
||||
color: color,
|
||||
user,
|
||||
name,
|
||||
color,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue