molsio
Running jobs only once in a cluster
I need to run an import job once every minute in the cluster, basically replicating the functionality of a Kubernetes job. I first tried to use Quantum core, but seems like the “singleton” functionality was removed.
How do you guys do it ?
Most Liked
rjk
see this example GitHub - connorlay/pulsar: Pulsar is an example Elixir application demonstrating globally unique, periodic jobs in a cluster. · GitHub it’s not mine, i found it in a similar topic on this forum. (it’s using highlander and periodic (that’s part of the ‘parent’ library). Docs for periodic are here: Periodic — parent v0.13.0
In this example highlander makes sure you have only a single process(job) running in your cluster, while periodic schedules the job every minute.
If it’s really important that it’s steady and you can use a (postgres) DB i would also advise to take a look at Oban
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance










