Skip to content
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

fix: lbac 2205: suppression de la table userrecruteurs #1283

Merged
merged 1 commit into from
Jun 4, 2024
Merged
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
6 changes: 0 additions & 6 deletions server/src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -574,12 +574,6 @@ program
.requiredOption("--from-date <string>, [fromDate]", "format DD-MM-YYYY. Date depuis laquelle les prises de rendez-vous sont renvoyéees")
.action(createJobAction("prdv:emails:resend"))

program
.command("migrate-multi-compte")
.description("Migre les données vers les tables multi-compte")
.option("-q, --queued", "Run job asynchronously", false)
.action(createJobAction("migrate-multi-compte"))

export async function startCLI() {
await program.parseAsync(process.argv)
}
12 changes: 5 additions & 7 deletions server/src/common/model/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ import SiretDiffusibleStatus from "./schema/siretDiffusibleStatusSchema/siretDif
import UnsubscribedLbaCompany from "./schema/unsubscribedLbaCompany/unsubscribedLbaCompany.schema"
import UnsubscribeOF from "./schema/unsubscribedOF/unsubscribeOF.schema"
import User from "./schema/user/user.schema"
import UserRecruteur from "./schema/userRecruteur/usersRecruteur.schema"

const createSpecialIndexes = async () => {
await db.collection("bonnesboites").createIndex({ geopoint: "2dsphere" })
Expand Down Expand Up @@ -91,15 +90,16 @@ export {
Application,
Appointment,
AppointmentDetailed,
Cfa,
Credential,
CustomEmailETFA,
DiplomesMetiers,
DomainesMetiers,
EligibleTrainingsForAppointment,
EmailBlacklist,
Entreprise,
Etablissement,
FicheMetierRomeV4,
ReferentielRome,
FormationCatalogue,
GeoLocation,
InternalJobs,
Expand All @@ -111,15 +111,13 @@ export {
Recruiter,
ReferentielOnisep,
ReferentielOpco,
ReferentielRome,
RoleManagement,
Session,
SiretDiffusibleStatus,
UnsubscribeOF,
UnsubscribedLbaCompany,
User,
UserRecruteur,
eligibleTrainingsForAppointmentHistory,
UserWithAccount,
Entreprise,
Cfa,
RoleManagement,
eligibleTrainingsForAppointmentHistory,
}

This file was deleted.

This file was deleted.

4 changes: 2 additions & 2 deletions server/src/jobs/anonymization/anonymizeUserRecruteurs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const anonymize = async () => {
},
},
{
$merge: "anonymizeduser2s",
$merge: "anonymizeduserwithaccounts",
},
])
await Recruiter.aggregate([
Expand Down Expand Up @@ -60,7 +60,7 @@ const anonymize = async () => {
return { userWithAccountCount, recruiterCount }
}

export async function anonimizeUserRecruteurs() {
export async function anonimizeUsers() {
const subject = "ANONYMISATION DES USERS et RECRUITERS"
try {
logger.info(" -- Anonymisation des users de plus de 2 ans -- ")
Expand Down
1 change: 0 additions & 1 deletion server/src/jobs/database/validateModels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ export async function validateModels(): Promise<void> {
await validateModel(ReferentielOpco, ZReferentielOpco)
await validateModel(UnsubscribeOF, ZUnsubscribeOF)
await validateModel(UnsubscribedLbaCompany, ZUnsubscribedLbaCompany)
// await validateModel(UserRecruteur, ZUserRecruteur)
await validateModel(Entreprise, ZEntreprise)
await validateModel(Cfa, zCFA)
await validateModel(UserWithAccount, ZUserWithAccount)
Expand Down
8 changes: 2 additions & 6 deletions server/src/jobs/jobs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { getLoggerWithContext } from "../common/logger"
import anonymizeOldAppointments from "./anonymization/anonumizeAppointments"
import anonymizeIndividual from "./anonymization/anonymizeIndividual"
import anonymizeOldApplications from "./anonymization/anonymizeOldApplications"
import { anonimizeUserRecruteurs } from "./anonymization/anonymizeUserRecruteurs"
import { anonimizeUsers } from "./anonymization/anonymizeUserRecruteurs"
import fixApplications from "./applications/fixApplications"
import { cronsInit, cronsScheduler } from "./crons_actions"
import { obfuscateCollections } from "./database/obfuscateCollections"
Expand Down Expand Up @@ -44,7 +44,6 @@ import updateGeoLocations from "./lbb/updateGeoLocations"
import updateLbaCompanies from "./lbb/updateLbaCompanies"
import updateOpcoCompanies from "./lbb/updateOpcoCompanies"
import { runGarbageCollector } from "./misc/runGarbageCollector"
import { migrationUsers } from "./multiCompte/migrationUsers"
import { activateOptoutOnEtablissementAndUpdateReferrersOnETFA } from "./rdv/activateOptoutOnEtablissementAndUpdateReferrersOnETFA"
import { anonimizeAppointments } from "./rdv/anonymizeAppointments"
import { anonymizeOldUsers } from "./rdv/anonymizeUsers"
Expand Down Expand Up @@ -341,7 +340,7 @@ export async function runJob(job: IInternalJobsCronTask | IInternalJobsSimple):
case "applications:anonymize":
return anonymizeOldApplications()
case "user-recruteurs:anonymize":
return anonimizeUserRecruteurs()
return anonimizeUsers()
case "companies:update":
return updateLbaCompanies(job.payload)
case "geo-locations:update":
Expand Down Expand Up @@ -370,9 +369,6 @@ export async function runJob(job: IInternalJobsCronTask | IInternalJobsSimple):
const { parallelism } = job.payload
return importReferentielOpcoFromConstructys(parseInt(parallelism))
}
case "migrate-multi-compte": {
return migrationUsers()
}
case "prdv:emails:resend": {
const { fromDate } = job.payload
return repriseEmailRdvs({ fromDateStr: fromDate })
Expand Down
Loading
Loading