Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc doc changes #123

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .formatter.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Used by "mix format"
[
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"]
]
31 changes: 27 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,31 @@
/_build
/deps
/doc
# The directory Mix will write compiled artifacts to.
/_build/

# If you run "mix test --cover", coverage assets end up here.
/cover/

# The directory Mix downloads your dependencies sources to.
/deps/

# Where third-party dependencies like ExDoc output generated docs.
/doc/

# Ignore .fetch files in case you like to edit your project deps locally.
/.fetch

# If the VM crashes, it generates a dump, let's ignore it too.
erl_crash.dump

# Also ignore archive artifacts (built via "mix archive.build").
*.ez

# Ignore package tarball (built via "mix hex.build").
honeydew-*.tar

# Temporary files, for example, from tests.
/tmp/

# Misc.
/Mnesia.*
.DS_Store
.elixir_ls
.elixir_ls
53 changes: 30 additions & 23 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
## 1.4.5 (2019-9-17)
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 1.4.5 (2019-09-17)

### Enhancements

* Return {:error, reason} tuple for Honeydew.start_queue/2 + start_workers/3. Thanks @hauleth!

## 1.4.4 (2019-8-1)
## 1.4.4 (2019-08-01)

### Bug Fixes

* Job results are now correctly passed to Success Modes

## 1.4.3 (2019-6-10)
## 1.4.3 (2019-06-10)

### Enhancements

Expand All @@ -20,20 +27,20 @@

* No longer assumes that ecto tables have a single primary key named `id`

## 1.4.2 (2019-6-7)
## 1.4.2 (2019-06-07)

### Bug Fixes

* Don't ignore mnesia table options provided by the user. Thanks @X4lldux!

## 1.4.1 (2019-5-9)
## 1.4.1 (2019-05-09)

### Enhancements

* Job execution filtering for Ecto Poll Queue with `:run_if` option, taking a boolean SQL fragment
* Adding `:timeout` option to `Honeydew.status/2`

## 1.4.0 (2019-4-8)
## 1.4.0 (2019-04-08)

### Enhancements
* __Delayed Jobs__
Expand All @@ -44,16 +51,16 @@

Queue Support:
- `Mnesia`

Fully supported, uses the system's montonic clock. It's recommended to use [Multi Time Warp Mode](http://erlang.org/doc/apps/erts/time_correction.html#multi-time-warp-mode), to prevent the monotonic clock from freezing for extended periods during a time correction, with `--erl "+C multi_time_warp"`.
- `EctoPollQueue`

Unsupported, since the Ecto queue doesn't use `async/3`. However, delayed retries are supported.

It's technically feasible to delay Ecto jobs. As Honeydew wants nothing to do with your model's insertion transaction (to limit its impact on your application), its job ordering is handled by default values in the migration. In order to delay Ecto jobs, you'll need to manually add a number of milliseconds to the `DEFAULT` value of honeydew's lock field in your insertion transaction.

- `ErlangQueue`

Unsupported, pending a move to a priority queue. See "Breaking Changes" below to use delayed jobs with an in-memory queue.

* __Exponential Retry (backoff)__
Expand All @@ -67,7 +74,7 @@

The `Retry` failure mode is now far more customizable, you can provide your own function to determine if, and when, you want
to retry the job (by returning either `{:cont, state, delay_secs}` or `:halt`).

See the [Exponential Retry Implementation](https://github.com/koudelka/honeydew/blob/master/lib/honeydew/failure_mode/exponential_retry.ex) and [docs](https://hexdocs.pm/honeydew/1.4.0/Honeydew.FailureMode.Retry.html)


Expand All @@ -80,60 +87,60 @@
* [Mnesia] The arguments for the Mnesia queue have been simplified, you no longer need to explicitly
provide a separate list of nodes, simply provide the standard mnesia persistence arguments:
`:ram_copies`, `:disc_copies` and `:disc_only_copies`.

See the [Mnesia Example](https://github.com/koudelka/honeydew/blob/master/examples/mnesia.exs)

* [ErlangQueue] The in-memory ErlangQueue is no longer the default queue, since it doesn't currently
support delayed jobs. If you still want to use it, you'll need to explicitly ask for it when starting
your queue, with the `:queue` argument. Instead, the default queue is now an Mnesia queue using `:ram_copies`
and the `:ets` access mode.

## 1.3.0 (2019-2-13)
## 1.3.0 (2019-02-13)

### Enhancements
* Ecto 3 support

## 1.2.7 (2019-1-8)
## 1.2.7 (2019-01-08)

### Enhancements
* Adding table prefixes to Ecto Poll Queue (thanks @jfornoff!)

## 1.2.6 (2018-9-19)
## 1.2.6 (2018-09-19)

### Enhancements
* Honeydew crash log statements now include the following metadata
`:honeydew_crash_reason` and `:honeydew_job`. These metadata entries
can be used for building a LoggerBackend that could forward failures
to an error logger integration like Honeybadger or Bugsnag.

## 1.2.5 (2018-8-24)
## 1.2.5 (2018-08-24)

### Bug fixes
* Don't restart workers when linked process terminates normally

## 1.2.4 (2018-8-23)
## 1.2.4 (2018-08-23)

### Bug fixes
* Catch thrown signals on user's init/1

## 1.2.3 (2018-8-23)
## 1.2.3 (2018-08-23)

### Bug fixes
* Gracefully restart workers when an unhandled message is received.

## 1.2.2 (2018-8-23)
## 1.2.2 (2018-08-23)

### Bug fixes
* Catch thrown signals from user's job code

## 1.2.1 (2018-8-20)
## 1.2.1 (2018-08-20)

### Bug fixes
* Stop ignoring `init_retry_secs` worker option
* Fixed `Honeydew.worker_opts` typespecs.
* Fixed `Honeydew.start_workers` specs.

## 1.2.0 (2018-8-17)
## 1.2.0 (2018-08-17)

Honeydew now supervises your queues and workers for you, you no longer need to
add them to your supervision trees.
Expand All @@ -153,7 +160,7 @@ add them to your supervision trees.
* Workers can now use the `failed_init/0` callback in combination with
`Honeydew.reinitialize_worker` to re-init workers if their init fails.
* Many other things I'm forgetting...

## ?

### Breaking Changes
Expand Down
2 changes: 1 addition & 1 deletion LICENSE → LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The MIT License (MIT)
# The MIT License (MIT)

Copyright (c) 2014 Michael Shapiro

Expand Down
24 changes: 18 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
Honeydew 💪🏻🍈
========

[![Build Status](https://travis-ci.org/koudelka/honeydew.svg?branch=master)](https://travis-ci.org/koudelka/honeydew)
[![Hex pm](https://img.shields.io/hexpm/v/honeydew.svg?style=flat)](https://hex.pm/packages/honeydew)
[![Module Version](https://img.shields.io/hexpm/v/honeydew.svg)](https://hex.pm/packages/honeydew)
[![Hex Docs](https://img.shields.io/badge/hex-docs-lightgreen.svg)](https://hexdocs.pm/honeydew/)
[![Total Download](https://img.shields.io/hexpm/dt/honeydew.svg)](https://hex.pm/packages/honeydew)
[![License](https://img.shields.io/hexpm/l/honeydew.svg)](https://github.com/koudelka/honeydew/blob/master/LICENSE.md)
[![Last Updated](https://img.shields.io/github/last-commit/koudelka/honeydew.svg)](https://github.com/koudelka/honeydew/commits/master)

Honeydew (["Honey, do!"](http://en.wiktionary.org/wiki/honey_do_list)) is a pluggable job queue and worker pool for Elixir, focused on at-least-once execution.

Expand All @@ -25,14 +30,14 @@ __Isolation__
- Optionally stores immutable state loaned to each worker (a database connection, for example).
- [Initialized Worker](https://github.com/koudelka/honeydew/tree/master/examples/initialized_worker)

__Strong Job Custody__
__Strong Job Custody__
- Jobs don't leave the queue until either they succeed, are explicitly abandoned or are moved to another queue.
- Workers are issued only one job at a time, no batching.
- If a worker crashes while processing a job, the job is reset and a "failure mode" (e.g. abandon, move, retry) is executed. (The default failure mode [is to abandon the job](https://hexdocs.pm/honeydew/Honeydew.html#start_queue/2).)
- [Job Lifecycle](https://github.com/koudelka/honeydew/blob/master/README/job_lifecycle.md)

__Clusterable Components__
- Queues, workers and your enqueuing processes can exist anywhere in the BEAM cluster.
- Queues, workers and your enqueuing processes can exist anywhere in the BEAM cluster.
- [Global Queues](https://github.com/koudelka/honeydew/tree/master/examples/global)

__Plugability__
Expand All @@ -54,7 +59,7 @@ __Easy API__
- [Hex Docs](https://hexdocs.pm/honeydew/Honeydew.html)


### <a name="ecto">Ecto Queue</a>
### Ecto Queue

The Ecto Queue is designed to painlessly turn your Ecto schema into a queue, using your repo as the backing store.

Expand Down Expand Up @@ -112,10 +117,17 @@ end
- Cancel jobs with `Honeydew.cancel/2`


### README
The rest of the README is broken out into slightly more digestible [sections](https://github.com/koudelka/honeydew/tree/master/README).
### GUIDES
The rest of the README is broken out into slightly more digestible [sections](https://github.com/koudelka/honeydew/tree/master/guides).

Also, check out the README files included with each of the [examples](https://github.com/koudelka/honeydew/tree/master/examples).

### CHANGELOG
It's worth keeping abreast with the [CHANGELOG](https://github.com/koudelka/honeydew/blob/master/CHANGELOG.md)

## Copyright and License

Copyright (c) 2014 Michael Shapiro

This work is free. You can redistribute it and/or modify it under the
terms of the MIT License. See the [LICENSE.md](./LICENSE.md) file for more details.
Empty file added config/docs.exs
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
94 changes: 59 additions & 35 deletions mix.exs
Original file line number Diff line number Diff line change
@@ -1,62 +1,86 @@
defmodule Honeydew.Mixfile do
use Mix.Project

@source_url "https://github.com/koudelka/honeydew"
@version "1.5.0"

def project do
[app: :honeydew,
version: @version,
elixir: "~> 1.12.0",
start_permanent: Mix.env() == :prod,
docs: docs(),
deps: deps(),
package: package(),
elixirc_paths: elixirc_paths(Mix.env),
description: "Pluggable local/clusterable job queue focused on safety.",
dialyzer: [
plt_add_apps: [:mnesia, :ex_unit],
flags: [
:unmatched_returns,
:error_handling,
:race_conditions,
:no_opaque
]
]
[
app: :honeydew,
version: @version,
elixir: "~> 1.12.0",
start_permanent: Mix.env() == :prod,
docs: docs(),
deps: deps(),
package: package(),
elixirc_paths: elixirc_paths(Mix.env()),
dialyzer: [
plt_add_apps: [:mnesia, :ex_unit],
flags: [
:unmatched_returns,
:error_handling,
:race_conditions,
:no_opaque
]
],
preferred_cli_env: [
docs: :docs,
"hex.publish": :docs
]
]
end

defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp elixirc_paths(_), do: ["lib"]

# Configuration for the OTP application
#
# Type `mix help compile.app` for more information
def application do
[extra_applications: [:logger],
included_applications: [:mnesia],
mod: {Honeydew.Application, []}]
[
extra_applications: [:logger],
included_applications: [:mnesia],
mod: {Honeydew.Application, []}
]
end

defp deps do
[
{:ecto, "~> 3.0", optional: true, only: [:dev, :prod]},
{:ex_doc, ">= 0.0.0", only: :dev},
{:dialyxir, "~> 1.0", only: [:dev, :test], runtime: false},
{:ex_doc, ">= 0.0.0", only: :docs, runtime: false},
{:dialyxir, "~> 1.0", only: [:dev, :test], runtime: false}
# {:eflame, git: "git@github.com:slfritchie/eflame", only: :dev},
]
end

defp package do
[maintainers: ["Michael Shapiro"],
licenses: ["MIT"],
links: %{"GitHub": "https://github.com/koudelka/honeydew"}]
[
description: "Pluggable local/clusterable job queue focused on safety.",
maintainers: ["Michael Shapiro"],
licenses: ["MIT"],
links: %{
Changelog: "https://hexdocs.pm/honeydew/changelog.html",
GitHub: @source_url
}
]
end

defp docs do
[extras: ["README.md"],
source_url: "https://github.com/koudelka/honeydew",
source_ref: @version,
assets: "assets",
main: "readme"]
[
extras: [
"CHANGELOG.md": [],
"LICENSE.md": [title: "License"],
"README.md": [title: "Overview"],
"guides/api.md": [],
"guides/caveats.md": [],
"guides/dispatchers.md": [],
"guides/job_lifecycle.md": [],
"guides/queues.md": [],
"guides/success_and_failure_modes.md": [],
"guides/workers.md": []
],
main: "readme",
assets: "assets",
source_url: @source_url,
source_ref: @version,
formatters: ["html"]
]
end
end
Loading