Skip to content

Commit cc321ef

Browse files
author
Kelvin Luck
committed
feat: Introduce disableFetchRevisions config flag
If you pass this flag then `fetchRevisions` doesn't attempt to fetch _any_ revisions from S3. This is useful because fetching the revisions from S3 can take a long time (see #120) and if you don't have any reason to use them then this time is wasted. In our use case I have hooked this flag up to an environment variable. e.g. - in `deploy.js`: ``` disableFetchRevisions: process.env.DISABLE_FETCH_REVISIONS ``` Then we can set that environment variable when we are calling the `activate` command and leave it off at any other time (so e.g. `ember deploy:list` works as expected - if you have the time to wait)
1 parent 8000d88 commit cc321ef

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

index.js

+7
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,13 @@ module.exports = {
107107
},
108108

109109
fetchRevisions: function(context) {
110+
if (this.readConfig('disableFetchRevisions')) {
111+
this.log('fetchRevisions - not fetching any revisions', { verbose: true });
112+
return {
113+
activations: []
114+
};
115+
}
116+
110117
return this._list(context)
111118
.then(function(revisions) {
112119
return {

0 commit comments

Comments
 (0)