update worker
This commit is contained in:
+6
-3
@@ -230,9 +230,12 @@ func main() {
|
||||
|
||||
// --- [NEW] Start Background Workers ---
|
||||
if cfg.SatuSehat.Enabled {
|
||||
// Inisialisasi Worker Manager yang akan mengelola semua background workers.
|
||||
// satusehatClient bisa di-pass jika diperlukan oleh worker lain.
|
||||
var satusehatClient satusehat.SatuSehatClient // Ganti nil dengan inisialisasi client jika sudah ada
|
||||
satusehatClient := satusehat.NewSatuSehatFactory(cfg.SatuSehat).Client()
|
||||
logger.Default().Info("SatuSehat client initialized",
|
||||
logger.String("base_url", cfg.SatuSehat.BaseURL),
|
||||
logger.String("auth_url", cfg.SatuSehat.AuthURL),
|
||||
)
|
||||
|
||||
workerManager := worker.NewManager(cfg, dbService, satusehatClient)
|
||||
|
||||
g.Go(func() error {
|
||||
|
||||
Reference in New Issue
Block a user