Execution after timeout
bookmark_borderbookmark
Stay organized with collections
Save and categorize content based on your preferences.
Sample that demonstrates code that should (but won't) execute after a GCF call times out.
Code sample
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],[],[[["This page demonstrates code samples in Go, Java, Node.js, and Python that are designed to execute for two minutes, showcasing how Cloud Functions might time out before completion."],["The provided code examples highlight the potential for a function's execution to be interrupted by a timeout if the set duration is less than two minutes, as each sample includes a two-minute delay."],["The samples use `time.Sleep` in Go, `TimeUnit.MINUTES.sleep` in Java, `setTimeout` in Node.js, and `time.sleep` in Python, to simulate a long-running process that could be cut short by a timeout."],["Authentication for Cloud Run functions is achieved through setting up Application Default Credentials, with a link provided for further instructions on local development environment authentication."],["The content directs users to the Google Cloud sample browser for further exploration of code samples across various Google Cloud products."]]],[]]