https://github.com/kortirso/ex_worker
Message processing with elixir
https://github.com/kortirso/ex_worker
elixir elixir-library genserver message-queue
Last synced: over 1 year ago
JSON representation
Message processing with elixir
- Host: GitHub
- URL: https://github.com/kortirso/ex_worker
- Owner: kortirso
- Created: 2019-02-11T09:19:07.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-14T06:23:37.000Z (over 7 years ago)
- Last Synced: 2025-02-22T09:42:06.411Z (over 1 year ago)
- Topics: elixir, elixir-library, genserver, message-queue
- Language: Elixir
- Homepage:
- Size: 33.2 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# ExWorker
Simple example of message processing with Elixir
## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `ex_worker` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:ex_worker, "~> 0.1.6"}
]
end
def application do
[
extra_applications: [..., :ex_worker]
]
end
```
## Mnesia Setup
To persist messages across application restarts, specify the DB path in your `config.exs`:
```elixir
config :mnesia, dir: 'mnesia/#{Mix.env}/#{node()}' # Notice the single quotes
```
And run the following mix task:
```bash
mix ex_worker.setup
```
## Usage
```elixir
ExWorker.Server.add_message("some text")
ExWorker.Server.add_messages(["some text", "another text"])
```
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/kortirso/ex_worker.
## License
The packages is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
## Disclaimer
Use this package at your own peril and risk.
## Documentation
Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at [https://hexdocs.pm/ex_worker](https://hexdocs.pm/ex_worker).