mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 09:03:02 +00:00
style: remove extraneous whitespace in imports
This commit is contained in:
committed by
Rainer Killinger
parent
16bbb7e9e3
commit
98f02b8830
@@ -25,15 +25,15 @@ import {
|
||||
} from '@openstapps/core';
|
||||
import * as ES from 'elasticsearch';
|
||||
import * as moment from 'moment';
|
||||
import { logger } from '../../common';
|
||||
import { MailQueue } from '../../notification/MailQueue';
|
||||
import { Bulk } from '../BulkStorage';
|
||||
import { Database } from '../Database';
|
||||
import { buildAggregations, parseAggregations } from './aggregations';
|
||||
import { AggregationSchema, ElasticsearchConfig, ElasticsearchObject } from './common';
|
||||
import {logger} from '../../common';
|
||||
import {MailQueue} from '../../notification/MailQueue';
|
||||
import {Bulk} from '../BulkStorage';
|
||||
import {Database} from '../Database';
|
||||
import {buildAggregations, parseAggregations} from './aggregations';
|
||||
import {AggregationSchema, ElasticsearchConfig, ElasticsearchObject} from './common';
|
||||
import * as Monitoring from './monitoring';
|
||||
import { buildQuery, buildSort } from './query';
|
||||
import { putTemplate } from './templating';
|
||||
import {buildQuery, buildSort} from './query';
|
||||
import {putTemplate} from './templating';
|
||||
|
||||
// this will match index names such as stapps_<type>_<source>_<random suffix>
|
||||
const indexRegex = /^stapps_([A-z0-9_]+)_([a-z0-9-_]+)_([-a-z0-9^_]+)$/;
|
||||
@@ -276,7 +276,7 @@ export class Elasticsearch implements Database {
|
||||
// don't delete indices that are in use already
|
||||
if (bulk.state !== 'done') {
|
||||
logger.info('deleting obsolete index', index);
|
||||
return await this.client.indices.delete({ index });
|
||||
return await this.client.indices.delete({index});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -309,7 +309,7 @@ export class Elasticsearch implements Database {
|
||||
}
|
||||
|
||||
// create the new index if it does not exists
|
||||
if (!(await this.client.indices.exists({ index }))) {
|
||||
if (!(await this.client.indices.exists({index}))) {
|
||||
// re-apply the index template before each new bulk operation
|
||||
await putTemplate(this.client);
|
||||
await this.client.indices.create({
|
||||
@@ -323,14 +323,14 @@ export class Elasticsearch implements Database {
|
||||
// add our new index to the alias
|
||||
const actions: ES.IndicesUpdateAliasesParamsAction[] = [
|
||||
{
|
||||
add: { index: index, alias: alias },
|
||||
add: {index: index, alias: alias},
|
||||
},
|
||||
];
|
||||
|
||||
// remove our old index if it exists
|
||||
if (typeof oldIndex === 'string') {
|
||||
actions.push({
|
||||
remove: { index: oldIndex, alias: alias },
|
||||
remove: {index: oldIndex, alias: alias},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -350,7 +350,7 @@ export class Elasticsearch implements Database {
|
||||
this.aliasMap[alias][bulk.source] = index;
|
||||
if (typeof oldIndex === 'string') {
|
||||
// delete the old index
|
||||
await this.client.indices.delete({ index: oldIndex });
|
||||
await this.client.indices.delete({index: oldIndex});
|
||||
logger.info('deleted old index', oldIndex);
|
||||
}
|
||||
logger.info('swapped alias index alias', oldIndex, '=>', index);
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import { SCBackendAggregationConfiguration, SCFacet, SCThingTypes } from '@openstapps/core';
|
||||
import { AggregationSchema } from './common';
|
||||
import {SCBackendAggregationConfiguration, SCFacet, SCThingTypes} from '@openstapps/core';
|
||||
import {AggregationSchema} from './common';
|
||||
|
||||
export type aggregationType = SCThingTypes | '@all';
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import { SCThingTypes } from '@openstapps/core';
|
||||
import { SCThing } from '@openstapps/core';
|
||||
import {SCThingTypes} from '@openstapps/core';
|
||||
import {SCThing} from '@openstapps/core';
|
||||
|
||||
/**
|
||||
* An elasticsearch bucket aggregation
|
||||
|
||||
@@ -22,8 +22,8 @@ import {
|
||||
} from '@openstapps/core';
|
||||
import * as ES from 'elasticsearch';
|
||||
import * as cron from 'node-cron';
|
||||
import { logger } from '../../common';
|
||||
import { MailQueue } from '../../notification/MailQueue';
|
||||
import {logger} from '../../common';
|
||||
import {MailQueue} from '../../notification/MailQueue';
|
||||
|
||||
/**
|
||||
* Check if the given condition fails on the given number of results and the condition
|
||||
|
||||
@@ -24,7 +24,7 @@ import {
|
||||
SCThingsField,
|
||||
SCThingTypes,
|
||||
} from '@openstapps/core';
|
||||
import { ElasticsearchConfig, ScriptSort } from './common';
|
||||
import {ElasticsearchConfig, ScriptSort} from './common';
|
||||
import {
|
||||
ESBooleanFilter,
|
||||
ESBooleanFilterArguments,
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
*/
|
||||
import {Client} from 'elasticsearch';
|
||||
import {readdir, readFile} from 'fs-extra';
|
||||
import { resolve } from 'path';
|
||||
import { logger } from '../../common';
|
||||
import {resolve} from 'path';
|
||||
import {logger} from '../../common';
|
||||
|
||||
/**
|
||||
* Assembles an elasticsearch template with all resolved subType-references
|
||||
|
||||
Reference in New Issue
Block a user