Is there a way to automatically refresh data in workshop - palantir-foundry

I have an application showing an object location on a map. The underlying data is refreshed every minute or so. Is it possible to make workshop refresh the data and update the position automatically every minute?

Related

how to reduce "URL Fetch calls" refresh rate in GoogleSheets?

I have a Spreadsheets that collects data from external JSON API to form a database, I know this JSON API updates 1 time a day, this my spreadsheets make about 500 "URL Fetch calls" to fill the whole database, because it is 1 call per line and the database has about 500 lines, in addition, I also do the "File > Share > Public on web" mode and I know that there is an audience of 50~100 people who access this page.
According to Google's rules, external data is limited to 20,000 per day, as stated on this page, in the "URL Fetch calls" line:
https://developers.google.com/apps-script/guides/services/quotas
If I check the option "automatically republish when changes are made" I notice that at the bottom of the page it shows the information "Updated automatically every 5 minutes", but with this option checked, the limit of the "URL Fetch calls" happens in the middle of the day exceeds.
So I have some questions:
spreadsheets make 500 calls every 5min. even if the data is not changed? if yes then i have 144,000 calls per day so is there any way to change this time to 5min. for 12hour?
by changing ImportJSON.gs is there any way to make this refresh rate be reduced to just 1 or 2 times a day?
here is the function I use to collect the JSON data:
https://github.com/bradjasper/ImportJSON/blob/master/ImportJSON.gs
At the moment I haven't tried anything to solve it, as I don't have much knowledge about this ImportJSON. I expect some code change in ImportJSON function or GoogleSheets config or something like that.
Use the Cache Service to make your custom function call external services less often. See Apps Script Best Practices for sample code. I am not affiliated with any product, website or book related with the Cache Service or the sample code, and I am not employed by any company that is so affiliated.
If all data rows can be retrieved in one go, get them all with one call instead of duplicating your spreadsheet formula 500 times.

Firebase event is not showing in Event tab

I have created a event on my Firebase dashboard
and can see it in Debug View
But I cannot see it in Events Tab, it's not there and I cannot mark it as a conversation event, as I need to set it.
Creating one from conversations tab does not specify app platform, which I need it to be for my iOS app.
How do I fix this issue?
There's an intended delay before the data shows up in the Events page. The initial data logged usually takes up to 24 hours to display and 3-4 hours delay for the succeeding data. DebugView on the other hand, shows you data (from events, event parameters, and user properties) as Analytics collects the data. This is used to help you set up data collection, troubleshoot issues as issues arise, and understand a user's behavior as the user explores your website or app. For additional information about the delay in Analytics reporting, you can refer to this blog post.

Create a dynamic ICS file that users can subscribe to

We have a website that users login to, and can then book on to courses. These courses and the bookings are stored in our SQL database against the user's UserID. On the course page the user is able to add the course to their Outlook calendar via a simple ICS file that is generated when the user clicks on the button to add it by submitted the required data into the ICS file within the URL that calls it and then using <%=Request("CourseName")%> in the ICS file itself.
We are now looking to create a new ICS file that a user can subscribe to that will update their Outlook calendar with all of the courses they have signed up for, and will automatically update if/when a course has a change applied to it or if the user signs up to a new course then this will also automatically be added to their calendar. I can work out how to generate an ICS file that will hold all of this data using a similar setup to what I have done for the individual courses above, but I cannot work out how to create an ICS file that automatically updates with new information.
I don't know if I need to;
1. Have a hardcoded ICS file stored on the server for each individual user that is then updated as and when a change is made (I would prefer to avoid this as we have a lot of users)
2. If there is a way I can include a SQL statement within an ICS file that will then get the latest course data for the user on the fly (this is preferred, but testing this option so far has always resulted in errors)
3. Something else I have not thought of yet
Any help would be appreciated on this!
Here is the approach we are using to solve a similar problem:
Every time an admin changes an event or a user changes their subscription, we trigger an API call to do two things: (1) notify the relevant users of the changes using an auto-generated iCalendar event (.ics), and (2) update the database with the changes.
We opted to give the users and the administrators the power to trigger event-changes, rather than have a timer that checks and sends out updates, because we wanted to avoid the lag.
As to your question about auto-generating, this requires you to create an event_id, which you re-use in the .ics file, along with a METHOD:REQUEST, which notifies the user's email that you are sending a: (a) new event, or (b) change to a prior event. If you build a dynamic iCalendar script, this is possible. You must capture the "changes" and flow them through to a new .ics request.

How to set my url only available for a period of time? React

I am working on my react project and I need one page of my website only available for like 5 minutes.
For an instance, I will send user an email which contain an url, user can visited the webpage by clicking url. However, after a certain period of time (like 5 minute), user cannot access the webpage by clicking url anymore (which means the url is useless.)
How should I create such webpage with url in my React project?
You're going to want to do this on your server. Say you have a route that looks like this, /verification/:id and you send an email to the user with a link routing them to https://my-site/verification/cd5d00c4-ff6c-11e8-8eb2-f2801f1b9fd1. When the email is sent you can store that string, cd5d00c4-ff6c-11e8-8eb2-f2801f1b9fd1 in your database and set a timer to remove it from the database after a specified amount of time if it's still there. When someone navigates to /verification/:id you take the id and see if it exists in your database. If it does, let them verify and then remove it from the database.

Changing database records if no request fired

I am working on an IoT project. The device will request its state through a webservice/socket. I need to change a device's record if I got no request to get device's data within time slot.
How can I do that?