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 convenient meta updates #1202

Open
up2jj opened this issue Dec 10, 2024 · 2 comments
Open

Support for convenient meta updates #1202

up2jj opened this issue Dec 10, 2024 · 2 comments
Labels
area:oss Related to Oban OSS kind:enhancement New feature or request note:discussion Details or approval are up for discussion

Comments

@up2jj
Copy link

up2jj commented Dec 10, 2024

We have many long-running jobs that spawn sub-jobs. We would like to track the spawning progress at a low cost and are wondering if the meta is a good place to record progress and other helpful information.

Currently, Oban does not have any top-level mechanism to update meta. I know that pure Ecto can be used for updates, but it seems to me that a helper built into Oban itself would be a much more elegant solution encapsulating the configuration, with no direct reference to a specific Oban repo:

Oban.update_meta(job, fn meta -> ... end)

Using meta along with Oban.Web would significantly improve observability and be very helpful in debugging potential issues in our case.

I would be happy to take on the task of adding such a helper, with your guidance and assistance.

@sorentwo
Copy link
Member

We're looking at additional CRUD helpers (on the Read, Update, and Delete side, specifically). An additional function just to update meta feels too niche, though. A single update_job/3 function would be more flexible than a separate function for each updatable field.

This may be included prior to v2.19 🙂

@sorentwo sorentwo added kind:enhancement New feature or request note:discussion Details or approval are up for discussion area:oss Related to Oban OSS labels Dec 11, 2024
@up2jj
Copy link
Author

up2jj commented Dec 13, 2024

Superb! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:oss Related to Oban OSS kind:enhancement New feature or request note:discussion Details or approval are up for discussion
Projects
None yet
Development

No branches or pull requests

2 participants