Skip to content

Cloud functions that update firestore database with the latest FIRST® Robotics Competition events, teams, and avatars

Notifications You must be signed in to change notification settings

aamijar/team2059-scouting-firebase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

team2059-scouting-firebase

Node.js 10 Node.js 10

Cloud functions that update firestore database with the latest FIRST® Robotics Competition events, teams, and avatars

Updating the database can take ~20 minutes because of the amount of requests (with a 3 second delay) that must be made to the FIRST® events API.

Therefore it is best to split up the task into several functions since each has a timeout of 9 minutes in google cloud. The first function is triggered by an http endpoint and the latter three are chained using pubsub messages.

It is highly advised to test functions using an emulator:

$ firebase emulators:start

In order to deploy to production environment:

$ firebase deploy

In order to update the database manually you can visit the url below. You must be authenticated using gcloud sdk otherwise you will recieve a forbidden error.

$ curl https://us-central1-team2059-scouting.cloudfunctions.net/updateFirestore -H 
"Authorization: bearer $(gcloud auth print-identity-token)"

About

Cloud functions that update firestore database with the latest FIRST® Robotics Competition events, teams, and avatars

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published