Skip to content

Commit

Permalink
feat: adds Env_vars.md info about new var, remove delay from geo in api
Browse files Browse the repository at this point in the history
  • Loading branch information
rubvalave committed Jul 11, 2022
1 parent d7d8d2a commit 0717105
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
4 changes: 4 additions & 0 deletions ENV_VARS.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ applications.
on which the Express daemon of the Geoprocessing service will listen.
If running the API on the same host as the Geoprocessing application, you
need to modify at least one.
* `CLEANUP_CRON_INTERVAL` (string, optional, default is 0 0-23/6 * * *):
String in cron notation for the interval of time where the cleanup will
trigger. The default value is every 6 hours.


### PostgreSQL service - Geoprocessing database

Expand Down
3 changes: 0 additions & 3 deletions api/apps/api/config/custom-environment-variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,5 @@
},
"signUpConfirmation": {
"tokenPrefix": "SIGNUP_CONFIRMATION_TOKEN_PREFIX"
},
"cleanupCronJobSettings": {
"interval": "CLEANUP_CRON_INTERVAL"
}
}
3 changes: 0 additions & 3 deletions api/apps/api/config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,5 @@
},
"signUpConfirmation": {
"tokenPrefix": "/auth/sign-up-confirmation?token="
},
"cleanupCronJobSettings": {
"interval": "0 0-23/6 * * *"
}
}
7 changes: 3 additions & 4 deletions api/apps/api/test/utils/event-bus.test.utils.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { FixtureType } from '@marxan/utils/tests/fixture-type';
import { CqrsModule, EventBus, IEvent } from '@nestjs/cqrs';
import { Test } from '@nestjs/testing';
import { delay } from '../../../geoprocessing/test/utils';
import { EventBusTestUtils } from './event-bus.test.utils';

class FirstEventType implements IEvent {
Expand Down Expand Up @@ -78,7 +77,7 @@ const getFixtures = async () => {
new Promise<void>(async (resolve) => {
eventBus.publish(new SecondEventType('Wrong event class'));

await delay(500);
await new Promise((resolve) => setTimeout(resolve, 500));

eventBus.publish(new FirstEventType('Expected event class'));

Expand All @@ -97,13 +96,13 @@ const getFixtures = async () => {
new Promise<void>(async (resolve) => {
eventBus.publish(new SecondEventType('Wrong event class'));

await delay(500);
await new Promise((resolve) => setTimeout(resolve, 500));

eventBus.publish(
new FirstEventType('Expected event class but wrong id'),
);

await delay(500);
await new Promise((resolve) => setTimeout(resolve, 500));

eventBus.publish(new FirstEventType('Foo'));

Expand Down

0 comments on commit 0717105

Please sign in to comment.