Dont hang outstanding jobs when blockstoreManager shuts down#239
Dont hang outstanding jobs when blockstoreManager shuts down#239
Conversation
|
I'm concerned that this just drops the jobs then does nothing. How about #240? |
|
I think #240 will still hang outstanding jobs on shutdown, because in the worker loop it returns on px.Closing() (and doesn't drain the queue)
At present we just ignore errors (and don't add anything into the results map for CIDs that get an error), which is why I was thinking that it should be ok to do the same if the process is closing. |
It shouldn't, unless I'm missing something. There's no buffer so:
|
|
Ah yeah I see that's true, I like this solution better. |
|
We can keep them for now. That's more of a future "this is tricky" concern. |
Fixes #237 by adding an
errorparameter to the job function. When the job is scheduled it first checks to see if there was a scheduling error before running.