yesodweb / wai

Haskell Web Application Interface
MIT License
834 stars 263 forks source link

Make reaper workloads modifiable #985

Closed FinleyMcIlwaine closed 7 months ago

FinleyMcIlwaine commented 7 months ago

It is convenient to be able to modify reaper workloads outside of the reaperAction in scenarios where we don't want to wait for reaperDelay for the jobs to be updated. This PR adds an atomic reaperModify function to the reaper API which enables this.

Since this changes the visible Reaper constructor, I did a major version bump (auto-update 0.1.6 -> 0.2.0) and added a changelog entry. I also bumped the warp dependency on auto-update upper bound.

Before submitting your PR, check that you've:

After submitting your PR:

kazu-yamamoto commented 7 months ago

@snoyberg I'm OK with this PR. But I don't remember why the Reaper constructor is exported. Should we stop exporting it and export it from Reaper.Internal?

kazu-yamamoto commented 7 months ago

Merged anyway. I will probably make Reaper.Internal later. Thank you for your contribution!