{"id":15013429,"url":"https://github.com/lh0x00/unblock","last_synced_at":"2025-10-06T07:30:28.414Z","repository":{"id":45167658,"uuid":"160031002","full_name":"lh0x00/unblock","owner":"lh0x00","description":"this package provides `this.unblock` inside Meteor publications","archived":false,"fork":true,"pushed_at":"2023-12-31T07:43:47.000Z","size":14,"stargazers_count":16,"open_issues_count":2,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-01T05:08:27.260Z","etag":null,"topics":["ddp","hack","meteor","meteorjs","meteorx","performance","publications","subscriptions","unblock"],"latest_commit_sha":null,"homepage":"https://atmospherejs.com/lamhieu/unblock","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"meteorhacks/unblock","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lh0x00.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2018-12-02T09:14:41.000Z","updated_at":"2023-10-15T11:25:17.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/lh0x00/unblock","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lh0x00%2Funblock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lh0x00%2Funblock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lh0x00%2Funblock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lh0x00%2Funblock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lh0x00","download_url":"https://codeload.github.com/lh0x00/unblock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235510114,"owners_count":19001650,"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":["ddp","hack","meteor","meteorjs","meteorx","performance","publications","subscriptions","unblock"],"created_at":"2024-09-24T19:44:16.265Z","updated_at":"2025-10-06T07:30:23.098Z","avatar_url":"https://github.com/lh0x00.png","language":"JavaScript","readme":"# Unblock\n\n[![github issues][github-issues-image]][github-issues-url]\n[![build status][travis-image]][github-project-url]\n\nUse this.unblock inside Meteor Publications. This is a project to provide `this.unblock` functionality to publications for versions of meteor below 2.3. `this.unblock` is [supported](https://github.com/meteor/meteor/pull/11392) for meteor versions 2.3 and above.\n`this.unblock` inside publications is one of most(may be a little bit less) [requested](https://github.com/meteor/meteor/issues/853) feature and but it hasn't been implemented yet!\n\nFork from [meteorhacks/unblock](https://github.com/meteorhacks/unblock). I will maintain it and update it in the future. If you find an error, please open the issue in this project!\n\n## Why unblock?\n\nMeteor executes, DDP messages for a single client in a sequence. So, if one message takes a lot of time to process, that time will add up to all the messages. Luckily, there is an API called `this.unblock` which can be use inside methods as shown below.\n\n```javascript\nMeteor.methods({\n  longMethod: function() {\n    this.unblock();\n    Meteor._sleepForMs(1000 * 60 * 60);\n  },\n});\n```\n\nSo, other messages can start processing without waiting for the above method.\n\n**Unfortunately**, this is not available for Publications (subscriptions) for no reason. But now you can possible it with this project.\n\n## Installation\n\nread more in [atmospherejs](https://atmospherejs.com/lamhieu/unblock)\n\n```bash\n$ meteor add lamhieu:unblock\n```\n\nUse it inside your publications, if that takes too much time or you don't need subscriptions from other publications to wait on this.\n\n```javascript\nMeteor.publish(\"publicationName\", function() {\n  this.unblock(); // yeah!\n  Meteor._sleepForMs(1000 * 60 * 60);\n});\n```\n\n[github-project-url]: https://github.com/lamhieu-vk/unblock\n[travis-image]: https://travis-ci.com/lamhieu-vk/unblock.svg?branch=master\n[github-issues-image]: https://img.shields.io/github/issues/lamhieu-vk/unblock.svg\n[github-issues-url]: https://github.com/lamhieu-vk/unblock/issues\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flh0x00%2Funblock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flh0x00%2Funblock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flh0x00%2Funblock/lists"}