Prettier formatting

Signed-off-by: Damon Kaswell <damon.kaswell1@hp.com>
This commit is contained in:
Damon Kaswell
2022-11-21 18:02:15 -08:00
committed by Fredrik Adelöw
parent 1a3ae5af1f
commit 6404ad16aa
5 changed files with 35 additions and 28 deletions
@@ -79,7 +79,9 @@ exports.up = async function up(knex) {
table
.string('completion_ticket')
.notNullable()
.comment('indicates whether the ticket is still open or stamped complete')
.comment(
'indicates whether the ticket is still open or stamped complete',
);
});
await knex.schema.alterTable('ingestions', t => {
@@ -122,10 +124,7 @@ exports.up = async function up(knex) {
.defaultTo(0)
.comment('what is the order of this mark');
table
.timestamp('created_at')
.notNullable()
.defaultTo(knex.fn.now());
table.timestamp('created_at').notNullable().defaultTo(knex.fn.now());
});
await knex.schema.alterTable('ingestion_marks', t => {
@@ -14,4 +14,5 @@
* limitations under the License.
*/
export const DB_MIGRATIONS_TABLE = 'plugin_incremental_ingestion_backend__knex_migrations';
export const DB_MIGRATIONS_TABLE =
'plugin_incremental_ingestion_backend__knex_migrations';
@@ -291,12 +291,14 @@ export class IncrementalIngestionEngine implements IterationEngine {
doComputeRemoved = true;
}
}
if(doComputeRemoved) {
removed.push(...await this.manager.computeRemoved(
this.options.provider.getProviderName(),
id,
));
if (doComputeRemoved) {
removed.push(
...(await this.manager.computeRemoved(
this.options.provider.getProviderName(),
id,
)),
);
}
await this.options.connection.applyMutation({
@@ -30,8 +30,12 @@ class Deferred<T> implements Promise<T> {
#resolve?: (value: T) => void;
#reject?: (error: Error) => void;
get resolve() { return this.#resolve!; }
get reject() { return this.#reject!; }
get resolve() {
return this.#resolve!;
}
get reject() {
return this.#reject!;
}
then: Promise<T>['then'];
catch: Promise<T>['catch'];
@@ -89,16 +89,17 @@ export interface IncrementalEntityProvider<TCursor, TContext> {
*
* @public
*/
export type EntityIteratorResult<T> =
| {
done: false;
entities: DeferredEntity[];
cursor: T;
} | {
done: true;
entities?: DeferredEntity[];
cursor?: T;
}
export type EntityIteratorResult<T> =
| {
done: false;
entities: DeferredEntity[];
cursor: T;
}
| {
done: true;
entities?: DeferredEntity[];
cursor?: T;
};
/** @public */
export interface IncrementalEntityProviderOptions {
@@ -217,7 +218,7 @@ export interface IngestionUpsert {
/**
* This interface is for updating an existing ingestion record.
*
*
* @public
*/
export interface IngestionRecordUpdate {
@@ -227,7 +228,7 @@ export interface IngestionRecordUpdate {
/**
* The expected response from the `ingestion_marks` table.
*
*
* @public
*/
export interface MarkRecord {
@@ -240,7 +241,7 @@ export interface MarkRecord {
/**
* The expected response from the `ingestions` table.
*
*
* @public
*/
export interface IngestionRecord extends IngestionUpsert {
@@ -254,7 +255,7 @@ export interface IngestionRecord extends IngestionUpsert {
/**
* This interface supplies all the values for adding an ingestion mark.
*
*
* @public
*/
export interface MarkRecordInsert {