feat(client): add manual digital employee sync
This commit is contained in:
@@ -97,7 +97,9 @@ export function getDigitalEmployeeSyncStatus(): DigitalEmployeeSyncStatus {
|
||||
};
|
||||
}
|
||||
|
||||
export async function flushDigitalEmployeeSyncOutbox(options: { force?: boolean } = {}): Promise<DigitalEmployeeSyncStatus> {
|
||||
export async function flushDigitalEmployeeSyncOutbox(
|
||||
options: { force?: boolean } = {},
|
||||
): Promise<DigitalEmployeeSyncStatus> {
|
||||
if (syncing) return getDigitalEmployeeSyncStatus();
|
||||
|
||||
const config = resolveSyncConfig();
|
||||
@@ -213,7 +215,9 @@ function readAuthToken(serverHost: string | null): string | null {
|
||||
function readPendingOutbox(limit: number, force: boolean): OutboxRow[] {
|
||||
const db = getDb();
|
||||
if (!db) return [];
|
||||
const candidateLimit = force ? limit : limit * FAILED_RETRY_CANDIDATE_MULTIPLIER;
|
||||
const candidateLimit = force
|
||||
? limit
|
||||
: limit * FAILED_RETRY_CANDIDATE_MULTIPLIER;
|
||||
const rows = db
|
||||
.prepare(
|
||||
`
|
||||
|
||||
Reference in New Issue
Block a user