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

Support for Commanded 1.0 #13

Open
brentjanderson opened this issue Dec 5, 2019 · 5 comments
Open

Support for Commanded 1.0 #13

brentjanderson opened this issue Dec 5, 2019 · 5 comments

Comments

@brentjanderson
Copy link

Upgrading to v1.0 breaks commanded_scheduler with the following error:

== Compilation error in file lib/commanded/scheduler/scheduling/scheduling.ex ==
** (ArgumentError) Commanded.Scheduler.Scheduling expects :application option
    lib/commanded/event/handler.ex:332: Commanded.Event.Handler.compile_config/2
    lib/commanded/scheduler/scheduling/scheduling.ex:4: (module)
    (stdlib) erl_eval.erl:680: :erl_eval.do_apply/6

PR incoming with a naive patch, I'm not sure what the right pattern is for supporting multiple applications but it does work for a single application. I'd love feedback on how to do this right.

@brentjanderson
Copy link
Author

As a followup for those who might run across this same issue/PR - I switched over to using Oban for my particular use case. My Elixir chops aren't quite good enough to create this PR on my own.

@Sgiath
Copy link

Sgiath commented Sep 21, 2020

Hi, @slashdotdash I love commanded but I noticed that commanded-scheduler is pretty outdated, doesn't work with commanded 1.0 and last update was at January. So my question is if you plan to support it in the future or I shouldn't count on it.

Thanks for the response

@slashdotdash
Copy link
Member

@Sgiath I don't have any current plans to upgrade it. Using Commanded v1.x would allow a separate Commanded application and event store to be used for scheduling which would make it more self-contained. That is a worthwhile upgrade.

@jdewar
Copy link

jdewar commented Sep 2, 2021

@Sgiath I don't have any current plans to upgrade it. Using Commanded v1.x would allow a separate Commanded application and event store to be used for scheduling which would make it more self-contained. That is a worthwhile upgrade.

@slashdotdash In Commanded 1.0 apps you build, do you have some new method for handling timeouts if not this scheduler? I am finding myself rebuilding something kinda like the scheduler to handle these -- timeouts for reservations seem like a relatively common pattern in the world of eventual consistency. Maybe the answer is something like 'just use schedex / rihanna / oban'?

@slashdotdash
Copy link
Member

slashdotdash commented Sep 6, 2021

Maybe the answer is something like 'just use schedex / rihanna / oban'?

Yes, I would just use an external job queue such as Rihanna which has Rihanna.schedule/2 to schedule a job. A Commanded event handler can be used to schedule jobs from events.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants