Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is there a way that Cloud Function can deal with long run operation?

If I want to use GCP Cloud Function to automate (also parallelise) image recognition using VISION API (Python3), but CF has a hard limit of 9 minutes duration. What if a image is very big, and takes a long time be recognised (longer than 9 minutes)? Any suggestions?

like image 239
FishingSlark Avatar asked Oct 18 '18 22:10

FishingSlark


People also ask

How long can a cloud function run for?

In Cloud Functions (1st gen), the maximum timeout duration is nine minutes (540 seconds). In Cloud Functions (2nd gen), the maximum timeout duration is 60 minutes (3600 seconds) for HTTP functions and 9 minutes (540 seconds) for event-driven functions.

How does cloud functions connect and extend cloud services?

Cloud Functions provides a connective layer of logic that lets you write code to connect and extend cloud services. Listen and respond to a file upload to Cloud Storage, a log change, or an incoming message on a Pub/Sub topic.

How do you stop clouds from running?

You cannot disable a function. Just comment the function body. It would be a good practice to log the call in the console and then return null so you can keep track whenever the function is invoked.

What are some common use cases for cloud functions?

Use Cloud Functions to respond to events from Pub/Sub to process, transform, and enrich streaming data in transaction processing, click-stream analysis, application activity tracking, IoT device telemetry, social media analysis, and other types of applications.


1 Answers

In the Cloud Function code, you can offload the work to App Engine or Compute Engine.

like image 132
Doug Stevenson Avatar answered Sep 22 '22 06:09

Doug Stevenson