{"id":15013495,"url":"https://github.com/meteor/ddp-graceful-shutdown","last_synced_at":"2025-06-10T21:10:57.594Z","repository":{"id":65982976,"uuid":"109896503","full_name":"meteor/ddp-graceful-shutdown","owner":"meteor","description":null,"archived":false,"fork":false,"pushed_at":"2018-06-07T14:05:38.000Z","size":54,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-09T23:38:58.266Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meteor.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-07T22:06:01.000Z","updated_at":"2025-01-16T03:28:51.000Z","dependencies_parsed_at":"2023-02-19T18:45:16.367Z","dependency_job_id":null,"html_url":"https://github.com/meteor/ddp-graceful-shutdown","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meteor%2Fddp-graceful-shutdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meteor%2Fddp-graceful-shutdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meteor%2Fddp-graceful-shutdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meteor%2Fddp-graceful-shutdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meteor","download_url":"https://codeload.github.com/meteor/ddp-graceful-shutdown/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meteor%2Fddp-graceful-shutdown/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259028781,"owners_count":22794955,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T19:44:21.408Z","updated_at":"2025-06-10T21:10:55.905Z","avatar_url":"https://github.com/meteor.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [@meteorjs/ddp-graceful-shutdown](https://www.npmjs.com/package/@meteorjs/ddp-graceful-shutdown)\n\n[![Build Status](https://travis-ci.org/meteor/ddp-graceful-shutdown.svg?branch=master)](https://travis-ci.org/meteor/ddp-graceful-shutdown)\n\nThis npm package is designed for use with [Meteor](https://www.meteor.com/) apps\nrunning on platforms such as Galaxy which send SIGTERM signals and wait a grace\nperiod before killing processes.\n\nTo use on Galaxy:\n\n``` javascript\nimport {DDPGracefulShutdown} from '@meteorjs/ddp-graceful-shutdown';\nimport {Meteor} from 'meteor/meteor';\n\nnew DDPGracefulShutdown({\n  gracePeriodMillis: 1000 * process.env.METEOR_SIGTERM_GRACE_PERIOD_SECONDS,\n  server: Meteor.server,\n}).installSIGTERMHandler();\n```\n\nThis registers a SIGTERM handler which will call\n`ddpGracefulShutdown.closeConnections({log: true})`. To trigger on a different\nsignal, disable logging, or only trigger after some other clean up, just call\nthat method yourself from an appropriate handler.\n\nYou should call this from top level code as soon as possible; this means that it\nwill run before the Meteor `webapp` package starts listening. If it is created\nafter connections already exist, they will not be tracked.\n\nThis should work on all recent Meteor releases --- the `onConnection` API it\nrelies on was introduced in 0.7.0, and it is transpiled to ES5 on npm.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeteor%2Fddp-graceful-shutdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeteor%2Fddp-graceful-shutdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeteor%2Fddp-graceful-shutdown/lists"}