Read the statement by Michael Teeuw here.
Calendar module fetchInterval
-
@Anhalter42 Maybe there was one someday and the code was changed over time and the readme wasn’t adjusted accordingly or it is as a direction for users that aren’t familiar with those numbers so they don’t put something weird in it. Either way I can’t see a reason to sync a calendar less then a day?
-
@strawberry-3.141 Thx. Mh usually you are correct, but for example holidays as given in the example config of this module don’t change ever. There is no point in updating this hourly (unnecessary traffic for self and server). Instead, for something like this it would be sufficient to update yearly or even “never” (it updates at start and I guess you usually restart the mirror once a year).
-
@Anhalter42 so should the fetchInterval be moved to the calendar array since some calendars only need to be updated once (holidays) and others more often. just a thought have a defaultFetchInterval at the module level and fetchInterval for calendar level?
-
@cohron Well… yes. Are you interested in implementing this? If you don’t rename the existing option
fetchInterval
(instead call the new optionsoverwriteFetchInterval
or something), it should be compatible with existing config files and therefore likely to be accepted. -
@strawberry-3.141 - I can. If you have a personal calendar (Google, Outlook, Apple, etc.) that you update frequently, you probably want to refresh it hourly or so. My wife and I use our Google calendars extensively to keep each other up to date on everything from doctor’s appointments, working late, running errands at the store/cleaners/bank. Basically anything that might throw our expected schedules off. It keeps us from starting unnecessary search parties (my wife has a serious health condition - if she doesn’t show up on time, there is a non-trivial chance she’s unconscious somewhere)
When I get the home mirror set up, we’ll probably shift to a shared calendar that we can both add events.
-
@bhepler I’m the same oppinion as you are, probably didn’t explain it well. I can’t see a point why you would care to fetch less frequent than a day.
-
@strawberry-3.141 Aha! Yeah, I misunderstood. “less than a day” = “less frequently than at least once per day”, as opposed to my interpretation. My interpretation was “a frequency interval of less than one day”.
Interesting question: Does the calculation that writes out the “xx days” string only occur on the fetch? For example, if I have an event in four days and I don’t perform a fetch for a week, will it correctly change the text to read “day after tomorrow” at the appropriate time?
If I were only showing holidays on my calendar then such a thing might make sense. How often do holidays change, right?
-
@Anhalter42 Definately, and excellent point about not changing the existing option name. I’m hoping to implement a (swimming) pool module in the next couple of months. I haven’t coded (VB) in over a decade so i am reading up about Github (great concept btw). Not sure if i need to branch or pull request or what just yet. I think i can handle learning JS and use the existing modules to reference. This will be a great exercise for me before i jump into full coding.
-
@cohron Just in case this helps you:
If you want to change something / contribute to an existing project you have to fork it, change what you want to change and create a Pull-Request (which then gets reviewed and accepted/rejected).
For developing your own module you just need to create a new project, i think. In case you didn’t see it, there is a handy template module you could use as base. -
@Anhalter42 I spend some time going through the calendar module code, i can read it fairly well, for the syntax i dont understand there is always google. After review, I see why there are no separate fetchInterval’s for each calendar. Each calendar’s events are added to an array, then sorted together also the dom (html table) is created from scratch on each interval. Without a tremendous restructuring of code, setting up separate interval timers, persisting the ical events array, etc. the value to adding this is limited.
Your comments help me immensely, thank you. I reviewed the template module, i’l start playing with that and do a Hello World module exercise when i return home at the end of the month.