-
-
Notifications
You must be signed in to change notification settings - Fork 337
Description
I aim to provide clear details to my users about when data was and will be processed. Currently, I show (on a web page) when a scheduled job last ran (using lastUpdate, _ := job.LastRun()) and when it will next run (using nextUpdate, _ := job.NextRun()).
However, if the web page shows "this job last ran at 9am" and it is 9.01am, the user may think that the data on-screen has been updated by the job that ran at 9am, but in reality, the job takes 10 minutes and the data is not yet updated. While the statement is correct, it does not show the real picture.
It would be incredibly useful to be able to tell if a job is in progress, and when it completed. For example, running, _ := job.IsRunning() returning a bool (true for the job is still in progress, false for not), and completedAt, _ := job.CompletedAt() returning time.Time() of the last run's time of completion.
I haven't considered any alternatives at this time, because these are 'nice to have' rather than 'business critical' things.
Thank you for this package, it's lovely to use. 👍