{"id":42684800,"url":"https://github.com/codepr/rainex","last_synced_at":"2026-01-29T12:07:58.823Z","repository":{"id":78234668,"uuid":"559625610","full_name":"codepr/rainex","owner":"codepr","description":"Playground with weather forecast services","archived":false,"fork":false,"pushed_at":"2025-11-03T13:23:10.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-03T15:18:05.863Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codepr.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-10-30T17:37:06.000Z","updated_at":"2025-11-03T13:23:14.000Z","dependencies_parsed_at":"2024-12-27T17:31:09.487Z","dependency_job_id":null,"html_url":"https://github.com/codepr/rainex","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codepr/rainex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codepr%2Frainex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codepr%2Frainex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codepr%2Frainex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codepr%2Frainex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codepr","download_url":"https://codeload.github.com/codepr/rainex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codepr%2Frainex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28877122,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T10:31:27.438Z","status":"ssl_error","status_checked_at":"2026-01-29T10:31:01.017Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2026-01-29T12:07:54.334Z","updated_at":"2026-01-29T12:07:58.814Z","avatar_url":"https://github.com/codepr.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rainex\n\nSimple monitoring service, inspired by the excellent [Elixir cluster article](https://vladimir-sobolev.medium.com/creating-a-cluster-with-elixir-c6aa83be5eca).\n\nSchedule workers to fetch forecasts from Tokyo and Rome in a 10s spans once every 5s\n```bash\ncurl -X POST http://localhost:4001/monitor -H 'Content-Type: application/json' -d '{\"period\": 10, \"frequency\": 5, \"locations\": [\"Tokyo\", \"Rome\"]}'\n{\"id\":\"d2cd4bd4-688b-11ef-944b-0242ac130004\"}\n```\nQuery the monitoring ID\n```bash\ncurl http://localhost:4001/monitor/31a09314-688c-11ef-b373-0242ac130004 | jq\n```\n\nResults\n\n```json\n{\n  \"id\": \"31a09314-688c-11ef-b373-0242ac130004\",\n  \"state\": \"ready\",\n  \"forecasts\": [\n    {\n      \"time\": \"2024-09-01T18:01:21.022601Z\",\n      \"location\": \"Tokyo\",\n      \"country\": \"JP\",\n      \"weather\": {\n        \"temperature\": {\n          \"temp\": 27.1,\n          \"temp_max\": 27.8,\n          \"temp_min\": 25.3,\n          \"temp_unit\": \"celsius\"\n        },\n        \"sunrise\": 1725221648,\n        \"sunset\": 1725268092,\n        \"wind\": {\n          \"deg\": 200,\n          \"speed\": 6.17\n        }\n      }\n    },\n    {\n      \"time\": \"2024-09-01T18:01:21.072765Z\",\n      \"location\": \"Rome\",\n      \"country\": \"US\",\n      \"weather\": {\n        \"temperature\": {\n          \"temp\": 30.7,\n          \"temp_max\": 33.0,\n          \"temp_min\": 29.3,\n          \"temp_unit\": \"celsius\"\n        },\n        \"sunrise\": 1725189274,\n        \"sunset\": 1725235612,\n        \"wind\": {\n          \"deg\": 49,\n          \"gust\": 2.24,\n          \"speed\": 1.34\n        }\n      }\n    },\n    {\n      \"time\": \"2024-09-01T18:01:26.075233Z\",\n      \"location\": \"Tokyo\",\n      \"country\": \"JP\",\n      \"weather\": {\n        \"temperature\": {\n          \"temp\": 27.1,\n          \"temp_max\": 27.8,\n          \"temp_min\": 25.3,\n          \"temp_unit\": \"celsius\"\n        },\n        \"sunrise\": 1725221648,\n        \"sunset\": 1725268092,\n        \"wind\": {\n          \"deg\": 200,\n          \"speed\": 6.17\n        }\n      }\n    },\n    {\n      \"time\": \"2024-09-01T18:01:26.098709Z\",\n      \"location\": \"Rome\",\n      \"country\": \"US\",\n      \"weather\": {\n        \"temperature\": {\n          \"temp\": 30.7,\n          \"temp_max\": 33.0,\n          \"temp_min\": 29.3,\n          \"temp_unit\": \"celsius\"\n        },\n        \"sunrise\": 1725189274,\n        \"sunset\": 1725235612,\n        \"wind\": {\n          \"deg\": 49,\n          \"gust\": 2.24,\n          \"speed\": 1.34\n        }\n      }\n    }\n  ]\n}\n```\n\n### Quick setup\n\nRequires an OpenWeatherMap API key\n\n```bash\nmix release.init\ndocker network create cluster-net\ndocker-compose up --build\n```\n\n## Installation\n\nIf [available in Hex](https://hex.pm/docs/publish), the package can be installed\nby adding `rainex` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:rainex, \"~\u003e 0.1.0\"}\n  ]\nend\n```\n\nDocumentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)\nand published on [HexDocs](https://hexdocs.pm). Once published, the docs can\nbe found at \u003chttps://hexdocs.pm/rainex\u003e.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodepr%2Frainex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodepr%2Frainex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodepr%2Frainex/lists"}