meetings / gearsloth

Gearman job persistence and delayed execution system
MIT License
2 stars 0 forks source link

Injector documentation gives false promises #75

Open amv opened 10 years ago

amv commented 10 years ago

Currently the documentation reads: "If the task is succesfully inserted in to the persistent storage, injector will send gearman WORK_COMPLETE to the caller. This means that the task will be executed."

This might be changed to say "the task is persistently stored and the promise of it's execution is as strong as the chosen backend persistence scheme". We should also somehow state that in some cases it might be possible that the tasks are run multiple times as this is part of the promise definition that we are giving to the user.

Currently the documentation also reads: "If there is an error parsing the task, or if the injector fails to insert the task to the persistent storage, it will send WORK_WARNING with the appropriate error message followed by WORK_FAIL to the caller. This always means that the job will not be executed."

Is this really something that we can guarantee to the user? Is it not possible that the task is injected into the persistent storage but the worker fails before a successful reply is given? In this situation a FAIL will be returned but the task is still going to be executed.

In some cases it is perfectly possible to send a warning which gives a guarantee that the task is nor persistently stored (like for example if the task definition can not be parsed) but all the possible warnings should be documented and each should define wether it signals that the task is not persistently stored or wether it is unknown if it is or not.