{"id":18174441,"url":"https://github.com/mrc-ide/rrq","last_synced_at":"2025-04-07T05:34:28.418Z","repository":{"id":8984915,"uuid":"60171351","full_name":"mrc-ide/rrq","owner":"mrc-ide","description":":runner::runner::runner: Lightweight Redis queues","archived":false,"fork":false,"pushed_at":"2024-11-27T13:14:49.000Z","size":3360,"stargazers_count":24,"open_issues_count":6,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-22T14:05:45.752Z","etag":null,"topics":["cluster","infrastructure"],"latest_commit_sha":null,"homepage":"https://mrc-ide.github.io/rrq/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrc-ide.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-01T11:32:35.000Z","updated_at":"2024-11-27T13:11:07.000Z","dependencies_parsed_at":"2024-05-03T14:18:43.749Z","dependency_job_id":"5d8c0355-a207-4a7a-b395-1cf7c2fb1cf3","html_url":"https://github.com/mrc-ide/rrq","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrc-ide%2Frrq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrc-ide%2Frrq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrc-ide%2Frrq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrc-ide%2Frrq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrc-ide","download_url":"https://codeload.github.com/mrc-ide/rrq/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247601398,"owners_count":20964861,"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":["cluster","infrastructure"],"created_at":"2024-11-02T16:03:06.991Z","updated_at":"2025-04-07T05:34:23.395Z","avatar_url":"https://github.com/mrc-ide.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  error = FALSE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# rrq\n\n\u003c!-- badges: start --\u003e\n[![Project Status: WIP - Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)\n[![R-CMD-check](https://github.com/mrc-ide/rrq/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/mrc-ide/rrq/actions/workflows/R-CMD-check.yaml)\n[![codecov.io](https://codecov.io/github/mrc-ide/rrq/coverage.svg?branch=master)](https://codecov.io/github/mrc-ide/rrq?branch=master)\n[![CodeFactor](https://www.codefactor.io/repository/github/mrc-ide/rrq/badge)](https://www.codefactor.io/repository/github/mrc-ide/rrq)\n\u003c!-- badges: end --\u003e\n\nTask queues for R, implemented using Redis.\n\n## Getting started\n\n```{r}\nlibrary(rrq)\n```\n\nCreate an `rrq_controller` object\n\n```{r}\nobj \u003c- rrq_controller(\"rrq:readme\")\nrrq_default_controller_set(obj)\n```\n\nSubmit work to the queue:\n\n```{r}\nt \u003c- rrq_task_create_expr(runif(10))\nt\n```\n\nQuery task process:\n\n```{r}\nrrq_task_status(t)\n```\n\nRun tasks on workers in the background\n\n```{r}\nrrq_worker_spawn()\n```\n\nWait for tasks to complete\n\n```{r}\nrrq_task_wait(t)\n```\n\nRetrieve results from a task\n\n```{r}\nrrq_task_result(t)\n```\n\nQuery what workers have done\n\n```{r}\nrrq_worker_log_tail(n = Inf)\n```\n\nFor more information, see `vignette(\"rrq\")`\n\n```{r, include = FALSE}\nrrq_destroy(timeout_worker_stop = 10)\n```\n\n## Installation\n\nInstall from the mrc-ide R universe package repository:\n\n```r\ninstall.packages(\n  \"rrq\",\n  repos = c(\"https://mrc-ide.r-universe.dev\", \"https://cloud.r-project.org\"))\n```\n\nAlternatively, install with `remotes`:\n\n```r\nremotes::install_github(\"mrc-ide/rrq\", upgrade = FALSE)\n```\n\n## Testing\n\nTo test, we need a redis server that can be automatically connected to using the `redux` defaults.  This is satisfied if you have an unauthenticated redis server running on localhost, otherwise you should update the environment variable `REDIS_URL` to point at a redis server.  Do not use a production server, as the package will create and delete a lot of keys.\n\nA suitable redis server can be started using docker with\n\n```\n./scripts/redis start\n```\n\n(and stopped with `./scripts/redis stop`)\n\nAlternatively, on Windows, a native (i.e., not depending on CygWin, MSys, or WSL) port of Redis 5.0.14.1 can be installed from [here](https://github.com/tporadowski/redis/releases), and will run out of the box.\n\n## Testing the pkgdown site with examples\n\nThe documentation includes many executed code examples. To preview the documentation with the results of these, you'll need a Redis server running, and the rrq package installed. Then, in an R terminal:-\n\n```\nrrq::rrq_worker$new(\"rrq:example\")$loop()\n```\n\nto run a worker. Then in another R terminal,\n\n\n```\npkgdown::build_site()\n```\n\nand the pkgdown site will be built in the `docs/` folder.\n\n## License\n\nMIT © Imperial College of Science, Technology and Medicine\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrc-ide%2Frrq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrc-ide%2Frrq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrc-ide%2Frrq/lists"}