mirror of
https://github.com/maelstrom-cms/odin.git
synced 2026-04-25 16:26:13 +03:00
[GH-ISSUE #6] Unable to create/edit website with Cron monitoring enabled #4
Labels
No labels
bug
enhancement
help wanted
pull-request
question
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/odin-maelstrom-cms#4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @srichter on GitHub (Oct 4, 2019).
Original GitHub issue: https://github.com/maelstrom-cms/odin/issues/6
WebsiteControllerchecks for a fieldcron_keywordwhen validating the request in the store/update methods, but the text input's actual name iscron_key. Opening PR.@OwenMelbz commented on GitHub (Oct 4, 2019):
Hey thanks for this, I think I got lazy and rush changed some things via github directly (including this). Proves shouldn’t rush otherwise you’ll just screw up 😂
@srichter commented on GitHub (Oct 4, 2019):
No worries! Another issue I've noticed is that the displayed cron ping URLs are invalid when creating a site, as the site doesn't have an id yet. Might not make sense to show the URLs there.
I plan to implement notifications if crons are not pinged within a defined timeframe; would you be interested in a PR for that?
@OwenMelbz commented on GitHub (Oct 4, 2019):
Good catch :) that was the last thing I added quickly as we had some cron issues.
Regarding notifications - this is something I’d be interested in, however it would need to be something really simple, currently it works well because you can add an extra payload to help identify each scheduled task. However if we start adding defined timeframes you’d need to be able to assign each rule to different scheduled tasks, which then adds a complexity.
Have you got any ideas how to keep it super simple both at UI and implementation level to support multiple jobs?
@srichter commented on GitHub (Oct 4, 2019):
My initial ideas would be:
Define a single timeframe per website, which would only allow for rudimentary monitoring that any tasks are firing/completing.
Define the timeframe in each ping and use the last ping of that tasks's timeframe for determining when the next should occur
@OwenMelbz commented on GitHub (Oct 5, 2019):
So if you needed to make sure a scheduled task runs every minute, how would you define that in the UI?
@srichter commented on GitHub (Oct 5, 2019):
For the first option I'd just have another input to define the timeframe.
For the second option I'd use and explain in the UI a URL parameter such as
nextpingand the scheduled checker task would look through the past cron pings for ones containing that key in their payload and check to see if any of them are late. The tricky part would be determining how far back the checker looks to identify unique pings (maybe combine it with the first option to define the longest timeframe?).@OwenMelbz commented on GitHub (Oct 6, 2019):
I think i'd more likely accept a PR that uses the query string method, that way the feature is 100% opt-in and allows the ability from the word go to support multiple jobs.
The reason I say this is because primarily this is a tool that my company use, and our priority is that it works for us, anything that we introduce we'll have to maintain for the next X years within business hours, so we need to make sure it aligns with our goals.
So if you can solve it using query strings, then 👍🏽
@srichter commented on GitHub (Oct 7, 2019):
Sounds good. I'll see how I end up implementing it for my own use and then open a PR and we can go from there.