Skip to content

Commit

Permalink
fix: cronjob notification architecture refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementNumericite committed Dec 2, 2024
1 parent 7969c21 commit b318049
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
containers:
- name: notification
image: "{{ or .Values.registry .Values.global.registry }}/{{ .Values.global.imageProject }}/{{ .Values.global.imageRepository }}/app:{{ .Values.global.imageTag }}"
command: ["yarn", "cron-job"]
command: ["yarn", "cron-job-notifications"]
resources:
requests:
cpu: 200m
Expand Down
6 changes: 2 additions & 4 deletions webapp/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
# [0.72.0](https://github.com/SocialGouv/carte-jeune-engage/compare/v0.71.3...v0.72.0) (2024-11-29)


### Features

* obiz hook article update integration ([b56c08a](https://github.com/SocialGouv/carte-jeune-engage/commit/b56c08a36b575a16846854ab883212e859dd4474))
- obiz hook article update integration ([b56c08a](https://github.com/SocialGouv/carte-jeune-engage/commit/b56c08a36b575a16846854ab883212e859dd4474))

## [0.71.3](https://github.com/SocialGouv/carte-jeune-engage/compare/v0.71.2...v0.71.3) (2024-11-29)


### Bug Fixes

* obiz JSON interpretation ([95525e7](https://github.com/SocialGouv/carte-jeune-engage/commit/95525e741c323dc40a4d7e783eb8bafbf1b44a65))
- obiz JSON interpretation ([95525e7](https://github.com/SocialGouv/carte-jeune-engage/commit/95525e741c323dc40a4d7e783eb8bafbf1b44a65))

## [0.71.2](https://github.com/SocialGouv/carte-jeune-engage/compare/v0.71.1...v0.71.2) (2024-11-29)

Expand Down
2 changes: 1 addition & 1 deletion webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"seed:dev": "PAYLOAD_DROP_DATABASE=true tsx ./src/payload/seed/index.ts",
"seed:prod": "tsx ./src/payload/seed/index.ts",
"seed:forms": "tsx ./src/payload/seed/forms/index.ts",
"cron-job": "tsx ./src/notifications/index.ts",
"cron-job-notifications": "tsx ./src/cronjobs/notifications/index.ts",
"payload": "PAYLOAD_CONFIG_PATH=./src/payload/payload.config.ts payload",
"format": "prettier --write .",
"lint": "next lint"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { OfferIncluded } from "../server/api/routers/offer";
import { getPayloadClient } from "../payload/payloadClient";
import { sendPushNotification } from "../utils/sendPushNotification";
import { getBaseUrl } from "../utils/tools";
import { OfferIncluded } from "../../server/api/routers/offer";
import { getPayloadClient } from "../../payload/payloadClient";
import { sendPushNotification } from "../../utils/sendPushNotification";
import { getBaseUrl } from "../../utils/tools";

const slug = "new-offer-available";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import {
getBaseUrl,
isNbOfDaysToEndOfTheMonth,
payloadWhereOfferIsValid,
} from "../utils/tools";
import { getPayloadClient } from "../payload/payloadClient";
import { sendPushNotification } from "../utils/sendPushNotification";
import { Offer } from "../payload/payload-types";
} from "../../utils/tools";
import { getPayloadClient } from "../../payload/payloadClient";
import { sendPushNotification } from "../../utils/sendPushNotification";
import { Offer } from "../../payload/payload-types";

const slug = "reminder-auchan";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CouponIncluded } from "../server/api/routers/coupon";
import { getPayloadClient } from "../payload/payloadClient";
import { sendPushNotification } from "../utils/sendPushNotification";
import { getBaseUrl, dateDiffInDays } from "../utils/tools";
import { CouponIncluded } from "../../server/api/routers/coupon";
import { getPayloadClient } from "../../payload/payloadClient";
import { sendPushNotification } from "../../utils/sendPushNotification";
import { getBaseUrl, dateDiffInDays } from "../../utils/tools";

const slug = "reminder-offer-activated";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { OfferIncluded } from "../server/api/routers/offer";
import { getPayloadClient } from "../payload/payloadClient";
import { sendPushNotification } from "../utils/sendPushNotification";
import { getBaseUrl, payloadWhereOfferIsValid } from "../utils/tools";
import { OfferIncluded } from "../../server/api/routers/offer";
import { getPayloadClient } from "../../payload/payloadClient";
import { sendPushNotification } from "../../utils/sendPushNotification";
import { getBaseUrl, payloadWhereOfferIsValid } from "../../utils/tools";

const slug = "reminder-offer-user-preferences";

Expand Down
2 changes: 1 addition & 1 deletion webapp/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"**/*.tsx",
"**/*.cjs",
".next/types/**/*.ts",
"src/notifications/re"
"src/cronjobs/notifications/re"
],
"exclude": ["node_modules", "public/sw.js"]
}

0 comments on commit b318049

Please sign in to comment.