Skip to content

Commit

Permalink
Update cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxime Alza committed Oct 10, 2024
1 parent e3021fd commit 3f6f813
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
28 changes: 14 additions & 14 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ deploy-job:
environment:
name: open-source
script:
- cd /builds/petranslate/TradEmploi-backend/translation-app-assessment/backend/translation
- gcloud builds submit .
- cd /builds/petranslate/TradEmploi-backend/translation-app-assessment/backend/reporting
- gcloud builds submit .
- cd /builds/petranslate/TradEmploi-backend/translation-app-assessment/backend/token-broker
- gcloud builds submit .
# - cd /builds/petranslate/TradEmploi-backend/translation-app-assessment/backend/translation
# - gcloud builds submit .
# - cd /builds/petranslate/TradEmploi-backend/translation-app-assessment/backend/reporting
# - gcloud builds submit .
# - cd /builds/petranslate/TradEmploi-backend/translation-app-assessment/backend/token-broker
# - gcloud builds submit .
- cd /builds/petranslate/TradEmploi-backend/translation-app-assessment/backend/cleanup
- gcloud builds submit .
- cd /builds/petranslate/TradEmploi-backend/translation-app-assessment/backend/telemetry
- gcloud builds submit .
- cd /builds/petranslate/TradEmploi-backend/translation-app-assessment/backend/authentication
- gcloud builds submit .
- cd /builds/petranslate/TradEmploi-backend/translation-app-assessment/backend/detect-text
- gcloud builds submit .
- cd /builds/petranslate/TradEmploi-backend/translation-app-assessment/backend/pdf-to-image
- gcloud builds submit .
# - cd /builds/petranslate/TradEmploi-backend/translation-app-assessment/backend/telemetry
# - gcloud builds submit .
# - cd /builds/petranslate/TradEmploi-backend/translation-app-assessment/backend/authentication
# - gcloud builds submit .
# - cd /builds/petranslate/TradEmploi-backend/translation-app-assessment/backend/detect-text
# - gcloud builds submit .
# - cd /builds/petranslate/TradEmploi-backend/translation-app-assessment/backend/pdf-to-image
# - gcloud builds submit .
only:
refs:
- master
6 changes: 3 additions & 3 deletions translation-app-assessment/backend/cleanup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ app.use(cors(corsOptions));
// Init project and services
const projectId = process.env.GCP_PROJECT

// Call initializeFirebase during startup
initializeFirebase().then();

// Function to write monitoring "heartbeat" that cleanup has run
const writeMonitoring = async () => {
const monitoringOptions = {
Expand Down Expand Up @@ -82,6 +79,9 @@ app.get('/', async (_req, _res) => {
app.post('/', async (req, res, next) => {
try {

// Call initializeFirebase during startup
await initializeFirebase();

await kpi()
// Delete chat that have been expired for an hour or longer
const deletionPromises = []
Expand Down

0 comments on commit 3f6f813

Please sign in to comment.