-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #352 from ibi-group/dev
Release
- Loading branch information
Showing
109 changed files
with
5,036 additions
and
1,894 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,5 +15,12 @@ SPARKPOST_EMAIL: [email protected] | |
GTFS_DATABASE_URL: jdbc:postgresql://localhost/catalogue | ||
# GTFS_DATABASE_USER: | ||
# GTFS_DATABASE_PASSWORD: | ||
#MONGO_URI: mongodb://mongo-host:27017 | ||
|
||
# To configure a remote MongoDB service (such as MongoDB Atlas), provide all | ||
# Mongo properties below. Otherwise, only a database name is needed (server | ||
# defaults to mongodb://localhost:27017 with no username/password authentication). | ||
MONGO_DB_NAME: catalogue | ||
#MONGO_HOST: cluster1.mongodb.net | ||
#MONGO_PASSWORD: password | ||
#MONGO_PROTOCOL: mongodb+srv | ||
#MONGO_USER: user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
197 changes: 0 additions & 197 deletions
197
src/main/java/com/conveyal/datatools/common/utils/AWSUtils.java
This file was deleted.
Oops, something went wrong.
29 changes: 29 additions & 0 deletions
29
src/main/java/com/conveyal/datatools/common/utils/ExpiringAsset.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.conveyal.datatools.common.utils; | ||
|
||
/** | ||
* A class that holds another variable and keeps track of whether the variable is still considered to be active (ie not | ||
* expired) | ||
*/ | ||
public class ExpiringAsset<T> { | ||
public final T asset; | ||
private final long expirationTimeMillis; | ||
|
||
public ExpiringAsset(T asset, long validDurationMillis) { | ||
this.asset = asset; | ||
this.expirationTimeMillis = System.currentTimeMillis() + validDurationMillis; | ||
} | ||
|
||
/** | ||
* @return true if the asset hasn't yet expired | ||
*/ | ||
public boolean isActive() { | ||
return expirationTimeMillis > System.currentTimeMillis(); | ||
} | ||
|
||
/** | ||
* @return the amount of time that the asset is still valid for in milliseconds. | ||
*/ | ||
public long timeRemainingMillis() { | ||
return expirationTimeMillis - System.currentTimeMillis(); | ||
} | ||
} |
Oops, something went wrong.