Skip to content

feat/AB#80053_remove_pulljob_feature #944

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: 2.x.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 0 additions & 65 deletions __tests__/models/pullJob.test.ts

This file was deleted.

45 changes: 0 additions & 45 deletions __tests__/schema/query/pullJob.test.ts

This file was deleted.

32 changes: 1 addition & 31 deletions migrations/1664441608216-placeholders.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-loop-func */
import { startDatabaseForMigration } from '../src/utils/migrations/database.helper';
import { Dashboard, Resource, PullJob, ReferenceData } from '../src/models';
import { Dashboard, Resource, ReferenceData } from '../src/models';
import { Placeholder } from '../src/const/placeholders';
import { logger } from '../src/services/logger.service';
import get from 'lodash/get';
Expand Down Expand Up @@ -174,36 +174,6 @@ const migratePlaceholders = async () => {
}
await Promise.all(layoutPromises);

// === PULLJOB ===
logger.info('Start pulljob update');
const pullJobs = await PullJob.find({});
const mappingPromises: Promise<any>[] = [];
for (const pullJob of pullJobs) {
let modified = false;
for (const key in pullJob.mapping) {
if (pullJob.mapping[key].startsWith('$$')) {
pullJob.mapping[key] = '{{' + pullJob.mapping[key].slice(2) + '}}';
modified = true;
}
}
if (modified) {
pullJob.markModified('mapping');
mappingPromises.push(
pullJob.save().then(
() => {
logger.info('Pulljob "' + pullJob.name + '" mapping updated.');
},
(err) => {
logger.info(
'Could not update pullJob "' + pullJob.name + '" mapping.\n' + err
);
}
)
);
}
}
await Promise.all(mappingPromises);

// === REFERENCE DATA ===
logger.info('Start reference data update');
const referenceDatas = await ReferenceData.find({
Expand Down
2 changes: 0 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { SafeServer } from './server';
import mongoose from 'mongoose';
import pullJobScheduler from './server/pullJobScheduler';
import customNotificationScheduler from './server/customNotificationScheduler';
import { startDatabase } from './server/database';
import config from 'config';
Expand Down Expand Up @@ -31,7 +30,6 @@ startDatabase();
mongoose.connection.once('open', () => {
logger.log({ level: 'info', message: '📶 Connected to database' });
// subscriberSafe();
pullJobScheduler();
customNotificationScheduler();
});

Expand Down
124 changes: 0 additions & 124 deletions src/schema/mutation/addPullJob.mutation.ts

This file was deleted.

52 changes: 0 additions & 52 deletions src/schema/mutation/deletePullJob.mutation.ts

This file was deleted.

Loading