Skip to content
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.

Commit

Permalink
style(linting): linting
Browse files Browse the repository at this point in the history
  • Loading branch information
didimitrie committed Sep 20, 2019
1 parent f8286b1 commit 426955f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
9 changes: 7 additions & 2 deletions app/telemetry/appTelemetry.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ module.exports = ( app ) => {

try {
countly.init( {
// eslint-disable-next-line camelcase
app_key: '6b79ee267ff23c4b99108591c5b33f0ba8ed5e4b',
url: 'https://telemetry.speckle.works',
// eslint-disable-next-line camelcase
device_id: myMachineId,
debug: false
} )
Expand All @@ -24,14 +26,17 @@ module.exports = ( app ) => {
} )

app.use( ( req, res, next ) => {

next( ) // let's not block things, in case telemetry server is down.

try {
countly.track_view( `${req.method} "${req.route.path}"` )
} catch {
} catch ( err ) {
logger.info( 'Failed to initialise route based telemetry.' )
}

} )
} catch {
} catch ( err ) {
logger.info( 'Failed to initialise route based telemetry.' )
}
}
5 changes: 4 additions & 1 deletion app/telemetry/initTelemetry.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,17 @@ module.exports = ( ) => {
let tagVersion = 'unknown'

try {
exec( 'git describe --tags', ( err, stdout, stderr ) => {
exec( 'git describe --tags', ( err, stdout ) => {
tagVersion = stdout.split( '-' )[ 0 ]
logger.info( `Version: ${tagVersion}` )

countly.init( {
// eslint-disable-next-line camelcase
app_key: '6b79ee267ff23c4b99108591c5b33f0ba8ed5e4b',
url: 'https://telemetry.speckle.works',
// eslint-disable-next-line camelcase
device_id: myMachineId,
// eslint-disable-next-line camelcase
app_version: tagVersion,
debug: false
} )
Expand Down

0 comments on commit 426955f

Please sign in to comment.