Skip to content

Commit

Permalink
BC-435 - change script to end SJW on any instance (#3066)
Browse files Browse the repository at this point in the history
* BC-435, BB-388 - change script to end SJW on any instance
  • Loading branch information
virgilchiriac committed Oct 11, 2021
1 parent f6ec0a2 commit 1415d24
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -11,6 +11,7 @@ Allowed Types of change: `Added`, `Changed`, `Deprecated`, `Removed`, `Fixed`, `

### Added

- BC-388 - add simple script for end sjw
- BC-319 - add route to change the position of a course dashboard element
- BC-343 - run unstable e2e tests on label `run unstable tests`

Expand Down
9 changes: 0 additions & 9 deletions scripts/endLdapSchoolYear.js
@@ -1,22 +1,13 @@
const { Configuration } = require('@hpi-schul-cloud/commons');
const appPromise = require('../src/app');

const { info, error } = require('../src/logger');

const { yearModel, schoolModel } = require('../src/services/school/model');

const instances = ['default', 'n21'];

const NEXT_SCHOOL_YEAR = '2021/22';

appPromise
.then(async () => {
// eslint-disable-next-line no-process-env
if (!instances.includes(Configuration.get('SC_THEME'))) {
error(`Wrong Instance.`);
return process.exit(1);
}

const nextSchoolYearId = await yearModel.findOne({ name: NEXT_SCHOOL_YEAR }).select('_id').lean().exec();
info('Ending up Maintenance mode for LDAP schools');

Expand Down

0 comments on commit 1415d24

Please sign in to comment.