@@ -78,7 +78,7 @@ export class LocationStoreImpl implements LocationStore {
|
||||
return this.db.transaction(async tx => {
|
||||
const location = await this.db.location(id);
|
||||
if (!location) {
|
||||
throw new ConflictError(`No location found with with id: ${id}`);
|
||||
throw new ConflictError(`No location found with id: ${id}`);
|
||||
}
|
||||
await this.db.removeLocation(tx, id);
|
||||
this.notifyDeletion(location);
|
||||
|
||||
@@ -33,7 +33,7 @@ export class ProcessingStateManagerImpl implements ProcessingStateManager {
|
||||
errors: JSON.stringify(result.errors),
|
||||
state: result.state,
|
||||
relations: result.relations,
|
||||
deferedEntities: result.deferredEntities,
|
||||
deferredEntities: result.deferredEntities,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ export class ProcessingDatabaseImpl implements ProcessingDatabase {
|
||||
state,
|
||||
errors,
|
||||
relations,
|
||||
deferedEntities,
|
||||
deferredEntities,
|
||||
} = options;
|
||||
|
||||
const refreshResult = await tx<DbRefreshStateRow>('refresh_state')
|
||||
@@ -93,7 +93,7 @@ export class ProcessingDatabaseImpl implements ProcessingDatabase {
|
||||
|
||||
// Schedule all deferred entities for future processing.
|
||||
await this.addUnprocessedEntities(tx, {
|
||||
entities: deferedEntities,
|
||||
entities: deferredEntities,
|
||||
id,
|
||||
type: 'entity',
|
||||
});
|
||||
@@ -183,7 +183,7 @@ export class ProcessingDatabaseImpl implements ProcessingDatabase {
|
||||
.select()
|
||||
.where('next_update_at', '<=', tx.fn.now())
|
||||
.limit(request.processBatchSize)
|
||||
.orderBy('next_update_at', 'desc');
|
||||
.orderBy('next_update_at', 'asc');
|
||||
|
||||
await tx<DbRefreshStateRow>('refresh_state')
|
||||
.whereIn(
|
||||
|
||||
@@ -32,7 +32,7 @@ export type UpdateProcessedEntityOptions = {
|
||||
state?: Map<string, JsonObject>;
|
||||
errors?: string;
|
||||
relations: EntityRelationSpec[];
|
||||
deferedEntities: Entity[];
|
||||
deferredEntities: Entity[];
|
||||
};
|
||||
|
||||
export type RefreshStateItem = {
|
||||
|
||||
Reference in New Issue
Block a user