action-scheduler
action-scheduler copied to clipboard
Add a "Past-due" view for scheduled actions
Closes #510.
- [ ] After #509 and this PR have been merged, add a link to the view on the past-due actions admin notice (intro'd in #509).
@rrennick Job #1772.21 failed because of a unix timestamp comparison failure; can you please trigger a rebuild?
@crstauf triggered & passed.
Edit: I believe I've determined a solution.
~@rrennick How can the PR alert custom data stores to support the "Past-due" view?~
~In the PR, I've adjusted the built-in data stores, which means that custom data stores will not have the necessary code to support the "Past-due" view.~
~Suggestions?~
@rrennick @thenbrent This PR is ready for review.
@crstauf Thanks again. On initial look on this looks good. I'll hold it until the past due notice is merged.
Re-assigning to @barryhughes per p1659719396500269-slack-C0E1AV8T0.
Hi @barryhughes!
Thanks for the review! I've added the docblock per your request.
As for the async actions, I totally get what you mean. For those, "past due" means something different, but I'm not sure if there's an easy way to get the correct count using the query args that the AS datastore currently supports.
I guess we could get "creative": for instance, we could ignore async actions when checking whether there are any actions past due (maybe by subtracting actions with a scheduled date <= 0000-00-00 ...). Would that make sense?
That's not ideal as async actions can be "past due" in a way that makes sense in this check but we don't have the information nor query args to support that so we could at least try to reduce noise.
Please let me know if you think of a better way to do this check or if I'm missing something. Thanks!
Yep, I think you're right: unless we also want to make a schema change, there isn't really a clean and efficient way to handle this. I think we could ship this as it is (and we can make further enhancements in the future if feedback suggests it is needed). wdyt?
I think we could ship this as it is (and we can make further enhancements in the future if feedback suggests it is needed). wdyt?
Sounds good to me. If necessary, we could then do something along the lines I described above or revisit this issue on adding a way to search for async actions.