Page 1 of 1

Autogenerate and SFTP upload multiple chart events

Posted: Mon Jan 03, 2022 11:21 am
by Wheetie
I'm running into a couple issues trying to autogenerate and SFTP upload multiple different charts to my website. The goal is to have 24hr, 7day, monthly, and annual summary charts for my website. However I'm running into a couple issues because the names of the autogenerated charts change to reflect the range of the data. This seems to cause 2 issues because you can't use the actual file name in the SFTP template data field, and then even if I could, the .html file name would be constantly changing on my website.

It looks like there is a work around to this issue because a 2nd file (lastchart.html) is also generated and this can be used in SFTP template data field because the name never changes. But if I'm autogenerating multiple charts and then always trying to upload the "lastchart.html", I run into problems having 4 different html documents with the same name. The quick and easy solution is to just create a matching directory for each of these different charts.

However, some of the chart events are scheduled to run at the same time (before each new day), or will overlap (15 min & every hr), so now I run the risk of multiple competing processes trying to overwrite the same file before the SFTP has a chance to upload it.

Am I missing something, or is there a better way to do this? Will multiple chart events run concurrently, or will they run sequentially and I don't have to worry about it? It would be great if we could somehow name the lastchart.html file for each of the different chart events, or if it was appended with the name + timeframe + resolution to coincide with the event, but that doesn't seem possible.