Spaces:
Running
Running
Commit
·
8af18a0
1
Parent(s):
9cedae0
cache config
Browse files- app.js +4 -1
- config.json +1 -0
app.js
CHANGED
|
@@ -324,7 +324,8 @@ app.all('/render', async (req, res) => {
|
|
| 324 |
}
|
| 325 |
|
| 326 |
// check if already processed
|
| 327 |
-
|
|
|
|
| 328 |
let oZipName = jobID + ".zip"
|
| 329 |
let uploadedFileUrl = uploader.targetUploadUrl(oZipName)
|
| 330 |
let opZip = path.join(__dirname, 'out/' + oZipName)
|
|
@@ -343,6 +344,8 @@ app.all('/render', async (req, res) => {
|
|
| 343 |
} catch (e) {
|
| 344 |
console.log('error checking for upload cache at ', uploadedFileUrl)
|
| 345 |
}
|
|
|
|
|
|
|
| 346 |
}
|
| 347 |
|
| 348 |
if (manuObj.meta.posterImage) {
|
|
|
|
| 324 |
}
|
| 325 |
|
| 326 |
// check if already processed
|
| 327 |
+
let globalDisableCache = await Utils.getKeyAsync("disable_cache")
|
| 328 |
+
if (req.query.disable_cache != '1' && globalDisableCache != '1') {
|
| 329 |
let oZipName = jobID + ".zip"
|
| 330 |
let uploadedFileUrl = uploader.targetUploadUrl(oZipName)
|
| 331 |
let opZip = path.join(__dirname, 'out/' + oZipName)
|
|
|
|
| 344 |
} catch (e) {
|
| 345 |
console.log('error checking for upload cache at ', uploadedFileUrl)
|
| 346 |
}
|
| 347 |
+
} else {
|
| 348 |
+
Utils.log(req, `Render Caching disabled. Performing full render`)
|
| 349 |
}
|
| 350 |
|
| 351 |
if (manuObj.meta.posterImage) {
|
config.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
{
|
|
|
|
| 2 |
"appname": "semibit-media-render-farm",
|
| 3 |
"audit_log_creds": "common-creds/firebase/semibit-admin.json"
|
| 4 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"disable_cache": "1",
|
| 3 |
"appname": "semibit-media-render-farm",
|
| 4 |
"audit_log_creds": "common-creds/firebase/semibit-admin.json"
|
| 5 |
}
|