Skip to Content

haer-platform-bgjobs

Background workers (heavy-lifting async). Repo: github.com/msa-haer-org/haer-platform-bgjobs  · folder lokal sama.

Stack

Go. Postgres. Migrasi via golang-migrate.

Binary

  • notif-engine — HTTP notification API (Fiber): kirim email / socket event.
  • import-worker — polling tenant.import_jobs untuk batch import karyawan.
  • location-sync — sync harian master lokasi dari countrystatecity.in.

Alur lintas-repo

  • haer-platform-api manggil bgjobs lewat internal HTTP.
  • bgjobs balik emit socket ke haer-platform-api (yang punya SocketGateway).

Menjalankan & test

go build ./... go test ./...

Jalanin binary yang diperlukan. Detail di README.md.

Konvensi

Idiomatik Go, go vet bersih, error di-wrap dengan konteks.

Migrasi (golang-migrate)

Verifikasi up → down → up di clean DB. Migration = source of truth schema untuk service Go. Aturan lintas-repo: Data & Migrations.

Deploy

Dideploy via Coolify.

Source of truth: AGENTS.md + README.md di repo.