File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,8 @@ module.exports.clearCache = function clearGCPCache() {
1717 resultDict = null
1818}
1919
20- function fetchGCPInfo ( agent , callback ) {
20+
21+ async function fetchGCPInfo ( agent , callback ) {
2122 if ( ! agent . config . utilization || ! agent . config . utilization . detect_gcp ) {
2223 logger . trace ( { utilization : 'gcp' } , 'Skipping GCP due to being disabled via config.' )
2324 return setImmediate ( callback , null )
@@ -28,10 +29,10 @@ function fetchGCPInfo(agent, callback) {
2829 return setImmediate ( callback , null , resultDict )
2930 }
3031
31- const isAvail = gcpMetadata . isAvailable ( )
32+ const isAvail = await gcpMetadata . isAvailable ( )
3233 if ( isAvail ) {
33- console . debug ( 'hostname: ' , gcpMetadata . instance ( 'hostname' ) )
34- console . debug ( 'instanceId: ' , gcpMetadata . instance ( 'id' ) )
34+ console . debug ( 'hostname: ' , await gcpMetadata . instance ( 'hostname' ) )
35+ console . debug ( 'instanceId: ' , await gcpMetadata . instance ( 'id' ) )
3536 }
3637
3738 common . request (
You can’t perform that action at this time.
0 commit comments