In the job that fetches the Google Calendar data, you probably could set a lock in your cache, or database, which is checked before the booking system controller action returns a view/accepts form data. You can then remove the lock whenever the job completes.
Restrict access to a page when event fires
Hello, i have created a booking system which synchronizes with Google Calendar every 5 minutes and also truncates and old data and fetches new one from calendar, this process takes about 2-3 seconds.
What i want to do is, when the event to fetch data from Google Calendar fires, i want to disable access to the booking system for these 2-3 seconds then enable it again when the event ends, i want to do this because it truncates the old data and fetches new one, so if a person is looking at the booking system this 2-3 seconds all the book schedule times will be free and i don't want this to happen.
Is this kind of thing possible? Thanks and regards!
Please or to participate in this conversation.