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
Job Cancellation Support #587
Comments
had a brief look at implementing this but can't seem to find a way do it without introducing a major breaking change. in the meantime, i'd like to understand a bit more why exactly do you need this? |
I would like to have Jobs that take a long time e.g. 4h. The jobs can be started manually, but sometimes it might be called with wrong parameters or during development, you might not want to wait until the job has finished. So it would be convenient to cancel a job that is already running, to then restart it with the correct parameters. |
I'm wondering if one of you maybe know how to fix an issue with JobStorageProvider. I created a mongodb-atlas account, got the connection string and put it in the Fastendpoints solution. When I run the app I get: System.ArgumentException: ''mongodb://:@olaxxwh.mongodb.net/?authSource=admin:27017' is not a valid end point. (Parameter 'value')'. The bizarre thing is how the init function stuffed the port number in the connection string. Can someone point me to information on how to get mongodb provider to work in the Fastendpoints solution?? |
@Woodman9 the FE storage provider is db engine agnostic. so there's really no special handling you need to do for FE. by the looks of it, something has mangled up your connection string. afaik, the mongo connection string looks something like this:
can't give you exact steps for the official driver + atlas as i have not played with atlas in a long time. you might have some luck with my mongo library. and here's a sample job storage provider written for that lib. |
I so much appreciate your help!! The string you posted is actually exactly what I have. It would be helpful to have an example implementation of Mongo because I simply cannot understand how you guys make this work. The "InitDatabase(DbName)" in program.cs fails with the above message I posted. It's like Mongo is detecting environment and stuffing 27017 port into the connection string. I have no idea how to control that. I'm going to keep digging, but some sample code or comments would be helpful in the project template. Again, you reply is very much appreciated. |
@Woodman9 if you join our discord server and create a post with a repro project, I can look in to it for you. |
I will do that! I would like to become a contributor |
When I add a Job to a JobQueue, I want to be able to cancel the job afterwards.
This is how I would imagine it to be:
QueueJobAsync could return a reference to the created job, which features a Cancel method.
When this method is called, the job is removed from the JobStorageProvider and if the JobQueue is already running it cancels the CancelationToken from the Command.
The text was updated successfully, but these errors were encountered: