You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I discovered Coravel recently and I especially like the ability to tell different kinds of tasks not to run at the same time, quartz is currently unable to do this, or with much more programming efforts.
But now, I have a concern about IInvocable and ICancellableInvocable design. I find it quite weird and also quite cumbersome that we have to always implement the "CancellationToken" member for each cancellable task. In addition, the interface exposes a setter of the cancellation token member which I don't like that much.
So my question is: why not simply have just one interface "IInvocable" with an "Invoke" member taking a "CancellationToken" parameter? I find it way simpler. Like this :
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I discovered Coravel recently and I especially like the ability to tell different kinds of tasks not to run at the same time, quartz is currently unable to do this, or with much more programming efforts.
But now, I have a concern about IInvocable and ICancellableInvocable design. I find it quite weird and also quite cumbersome that we have to always implement the "CancellationToken" member for each cancellable task. In addition, the interface exposes a setter of the cancellation token member which I don't like that much.
So my question is: why not simply have just one interface "IInvocable" with an "Invoke" member taking a "CancellationToken" parameter? I find it way simpler. Like this :
What do you think about it ?
Beta Was this translation helpful? Give feedback.
All reactions