Comments (8)
You may be correct with that intituition since I am currently using redisson and it has no way of providing custom id as well (even for recurring tasks) so I guess it is users responsibility to keep track of those or linking meaningful names instead of the system. Feel free to close the issue whenever you need.
from jobrunr.
By the way, if you agree to these changes I can send a PR for any of the enhancement issues I create. Just let me know please.
from jobrunr.
I'm happy to foresee a delete api.
But I don't see the need for specifying a custom id. Is there a reason why you need it?
from jobrunr.
I wanted it so that deleting is easier if we could assign a label to jobs. Otherwise, you have to somehow do a book keeping of the jobids. Is there a way to know which jobid belongs to which job when deleting?
from jobrunr.
FYI, the delete api is progressing but was really difficult - take for example a long-running job that you want to delete (so it is already processing) when you delete it: I'm now interrupting the Thread so that the processing is cancelled and the job is stopped (even if it has not completed yet).
Regarding the book keeping of jobids - I don't understand your question: "Is there a way to know which jobid belongs to which job when deleting?"
For recurring jobs it makes sense to delete by a custom id that you can provide. But why do you need it for a normal enqueued job? Normally, if you enqueue a standard job and the queue is empty, it will be processed immediately - why would you delete it after enqueueing it?
Perhaps some extra business context can help me understand your exact problem?
from jobrunr.
Thanks for the improvements, I really would like to contribute as well once I have time too.
Maybe I am overthinking and wrong but cant you have a delayed task that will run 5 hours later? In that case you may want to cancel. Say that you schedule to send an email if you dont receive a particular event in 5 hours. Once you receive the event, you cancel the delayed job. Here you can link the job and event name so that it is easier to match.
Also for deleting, some users may want a graceful option (i.e. wait currently running instance to finish)
from jobrunr.
I can understand the business scenario but I don't know yet if providing the id for the job is the way to go.
I think it can result in a lot of other issues (what when you have more than one job for the same business concept, what if you enqueue 2 totally different jobs with the same id, ... ).
I'll look if I cannot find another solution that solves the problem...
from jobrunr.
Closing as ok with original poster
from jobrunr.
Related Issues (20)
- [BUG] HikariDataSource HikariDataSource (HikariPool-1) has been closed HOT 18
- [Improvement] Better BackgroundJobServer initialization in Spring HOT 1
- Severe JobRunr Exception HOT 1
- [BUG] Migration applies multiple times when containers start concurrently HOT 1
- Severe JobRunr Exception HOT 3
- [BUG] Jackson Afterburner causes deserialization issue HOT 4
- [BUG] DeleteDeletedJobsPermanentlyTask not using correct configuration
- [BUG] Kotlin default parameters HOT 1
- [BUG] java.util.ConcurrentModificationException HOT 19
- [BUG] Unexpected behaviour with the stream enqueue HOT 3
- [Feature] add support for kotlinx.serialization as JsonMapper HOT 6
- [BUG] Spring Boot GraalVM native mode build fails if Bean is defined via `JavaConfig` HOT 1
- 7.0.0: Document breaking change in JobDashboardProgressBar HOT 1
- Severe JobRunr Exception HOT 1
- [Feature] Automatically create jobs if Spring Bean is annotated with @Job annotation
- missing info on upgrade to 7.0 from upgrade page HOT 2
- [Improvement] Add maven central artifact relocation info
- [BUG] RecurringJobNotFoundException when migrating to v7.0.0 - when recurring job cron is disabled and entity never existed in recurring_jobs table. HOT 1
- Question: ordering of fire-and-forget job processing
- [BUG] Instruction 191 not found when throwing exception in lambda HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jobrunr.