More use of isProduction/isDevelopment getters
This commit is contained in:
@@ -18,7 +18,7 @@ export default class DebounceProcessor extends BaseProcessor {
|
||||
{
|
||||
// speed up revision creation in development, we don't have all the
|
||||
// time in the world.
|
||||
delay: (env.ENVIRONMENT === "development" ? 0.5 : 5) * 60 * 1000,
|
||||
delay: (env.isProduction ? 5 : 0.5) * 60 * 1000,
|
||||
}
|
||||
);
|
||||
break;
|
||||
|
||||
@@ -50,7 +50,7 @@ export default class ExportJSONTask extends ExportTask {
|
||||
|
||||
zip.file(
|
||||
`metadata.json`,
|
||||
env.ENVIRONMENT === "development"
|
||||
env.isDevelopment
|
||||
? JSON.stringify(metadata, null, 2)
|
||||
: JSON.stringify(metadata)
|
||||
);
|
||||
@@ -142,7 +142,7 @@ export default class ExportJSONTask extends ExportTask {
|
||||
|
||||
zip.file(
|
||||
`${serializeFilename(collection.name)}.json`,
|
||||
env.ENVIRONMENT === "development"
|
||||
env.isDevelopment
|
||||
? JSON.stringify(output, null, 2)
|
||||
: JSON.stringify(output)
|
||||
);
|
||||
|
||||
@@ -102,7 +102,7 @@ export default class RevisionCreatedNotificationsTask extends BaseTask<RevisionE
|
||||
});
|
||||
|
||||
if (notification) {
|
||||
if (env.ENVIRONMENT === "development") {
|
||||
if (env.isDevelopment) {
|
||||
Logger.info(
|
||||
"processor",
|
||||
`would have suppressed notification to ${user.id}, but not in development`
|
||||
|
||||
Reference in New Issue
Block a user