( searchSettings: SerializedSearchSettings, accountId: string )
| 92 | |
| 93 | /** persist timestamp as flag for next sync job */ |
| 94 | export async function persistEndFlag( |
| 95 | searchSettings: SerializedSearchSettings, |
| 96 | accountId: string |
| 97 | ) { |
| 98 | searchSettings.lastSync = new Date().getTime(); |
| 99 | // persist |
| 100 | await prisma.accounts.update({ |
| 101 | where: { id: accountId }, |
| 102 | data: { |
| 103 | searchSettings: JSON.stringify(searchSettings), |
| 104 | }, |
| 105 | }); |
| 106 | } |
| 107 | |
| 108 | export async function pushToTypesense({ |
| 109 | threads, |