{"id":22893982,"url":"https://github.com/railsmechanic/sidewalk","last_synced_at":"2025-05-07T19:20:36.432Z","repository":{"id":57548038,"uuid":"64017177","full_name":"railsmechanic/sidewalk","owner":"railsmechanic","description":"Sidewalk is an Elixir client which is compatible with Sidekiq, the »simple, efficient background processing library for Ruby«.","archived":false,"fork":false,"pushed_at":"2018-10-09T06:46:32.000Z","size":692,"stargazers_count":8,"open_issues_count":1,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-16T09:28:24.062Z","etag":null,"topics":["elixir","message-queue","queue","ruby","sidekiq"],"latest_commit_sha":null,"homepage":"https://hex.pm/packages/sidewalk","language":"Elixir","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/railsmechanic.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":"2016-07-23T13:21:50.000Z","updated_at":"2020-12-14T02:43:07.000Z","dependencies_parsed_at":"2022-09-26T18:41:07.473Z","dependency_job_id":null,"html_url":"https://github.com/railsmechanic/sidewalk","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/railsmechanic%2Fsidewalk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/railsmechanic%2Fsidewalk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/railsmechanic%2Fsidewalk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/railsmechanic%2Fsidewalk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/railsmechanic","download_url":"https://codeload.github.com/railsmechanic/sidewalk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252941307,"owners_count":21828848,"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":["elixir","message-queue","queue","ruby","sidekiq"],"created_at":"2024-12-13T23:16:26.696Z","updated_at":"2025-05-07T19:20:36.399Z","avatar_url":"https://github.com/railsmechanic.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sidewalk [![Build Status](https://travis-ci.org/railsmechanic/sidewalk.svg?branch=master)](https://travis-ci.org/railsmechanic/sidewalk)\nSidewalk is an Elixir client which is compatible with Sidekiq, the »simple, efficient background processing library for Ruby«.\nIt can be used to enqueue jobs for later processing alongside e.g. with an already existing Ruby application.\nFor more information about Sidekiq please refer to http://sidekiq.org.\n\nTo use Sidewalk you need to create a `%Sidewalk.Job{}` and enqueue it with one of the enqueue functions.\n\n## Supported features\n* Redis namespaces as already known with Sidekiq\n* Ability to configure the Redis server and connection details\n* Enqueuing jobs to be executed immediately\n* Enqueuing jobs to be executed in X seconds\n* Enqueuing jobs to be executed at a specific time\n\n## Installation\n1. Add `sidewalk` to your list of dependencies in `mix.exs`:\n\n  ```elixir\n  def deps do\n    [{:sidewalk, \"~\u003e 0.4.0\"}]\n  end\n  ```\n\n2. Ensure `sidewalk` is started before your application:\n\n  ```elixir\n  def application do\n    [applications: [:sidewalk]]\n  end\n  ```\n\n3. Fetch dependencies\n\n  ```bash\n  mix deps.get\n  ```\n\n## Configuration\n\n```elixir\nconfig :sidewalk,\n  host: \"localhost\",\n  port: 6379,\n  password: \"you password\",\n  namespace: \"your_namespace\",\n  database: 0,\n  pool_size: 10\n```\n\nYou can also use environment variables:\n```\nconfig :sidewalk, host: {:system, \"REDIS_HOST\"}\n```\n\n## Usage\nSidewalk offers three modes for enqueuing jobs:\n\n#### 1. Enqueuing a job with an immediate execution\n\n```elixir\njob = %Sidewalk.Job{class: \"MyWorker\", args: ['bob', 1, %{foo: 'bar'}]}\n{:ok, jid} = Sidewalk.Client.enqueue(job) # =\u003e jid: \"2f87a952ced00ea6cdd61245\"\n```\n\n#### 2. Enqueuing a job with a delayed execution defined in seconds\n\n```elixir\n# The time when the job should be executed is defined in seconds\n\njob = %Sidewalk.Job{class: \"MyWorker\", args: ['bob', 1, %{foo: 'bar'}]}\n{:ok, jid} = Sidewalk.Client.enqueue_in(job, 120) # =\u003e jid: \"a805893e8bd98bf965d1dd54\"\n```\n\n#### 3. Enqueuing a job to be executed at a specific time\n\n```elixir\n# The time when the job should be executed is defined as a unix timestamp\n\njob = %Sidewalk.Job{class: \"MyWorker\", args: ['bob', 1, %{foo: 'bar'}]}\n{:ok, jid} = Sidewalk.Client.enqueue_at(job, 1546293600) # =\u003e jid: \"d6ceac7d6c42d35ff6cac8a0\"\n```\n\n## License\nThe MIT License (MIT). Please see [License File](https://github.com/railsmechanic/sidewalk/blob/master/LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frailsmechanic%2Fsidewalk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frailsmechanic%2Fsidewalk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frailsmechanic%2Fsidewalk/lists"}