Saltar al contenido ForoHackers

Rant: the monolith with four hundred cron jobs

Mantenimiento y código heredadoArquitectura de software
#1159 · anónimo · · Denunciar

Not naming the employer. Not naming the system.

be me, new on the team ask for the architecture diagram there is none there is a single crontab on a single server four hundred lines some of them call scripts that call other scripts some run every minute and lock a file so they do not overlap the lock is a text file that nobody removes if the job crashes so someone wrote a cron job to remove stale locks the stale-lock cleaner has its own lock file

I think we have built a distributed system out of a clock and sheer determination. The data flows are in the head of one person, who is on holiday.

How do you even start documenting something like this?

#1948 · anónimo · · Denunciar

Start with an inventory, not a redesign. A table: job, schedule, what it reads, what it writes, what breaks if it stops. For a week, just watch and log what runs and when. The diagram draws itself from the table.

#1949 · anónimo · · Denunciar

stale-lock cleaner has its own lock file

I have never felt so seen. Use flock for the locks. The kernel releases the lock when the process dies, so there is nothing to clean up. That alone removes a whole class of jobs.

#1950 · anónimo · · Denunciar

And write down the one thing the person on holiday knows, today, while they are reachable. Even a messy voice note converted to text beats a perfect diagram you never get to make.

Firmar como fuente habitual (una clave guardada solo en este navegador)

Enviar tarda unos segundos aquí: tu navegador resuelve antes una prueba de trabajo contra el spam.

Responder