first commit
This commit is contained in:
commit
3c0479faf0
169 files changed
+27617
No files matched your search
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Background monitors
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Started with the HTTP server only (not with the ace commands): host
|
||||
| metrics, containers stats, site checks and the daily backup.
|
||||
|
|
||||
*/
|
||||
|
||||
import app from '@adonisjs/core/services/app'
|
||||
import backupService from '#services/backup_service'
|
||||
import dockerService from '#services/docker_service'
|
||||
import metricsService from '#services/metrics_service'
|
||||
import siteMonitor from '#services/site_monitor'
|
||||
|
||||
app.ready(() => {
|
||||
metricsService.start()
|
||||
dockerService.startStatsPolling()
|
||||
siteMonitor.start()
|
||||
backupService.startSchedule()
|
||||
})
|
||||
|
||||
app.terminating(() => {
|
||||
metricsService.stop()
|
||||
dockerService.stopStatsPolling()
|
||||
siteMonitor.stop()
|
||||
backupService.stopSchedule()
|
||||
})
|
||||
Reference in new issue
Block a user