- Log workforce sync errors to backend stdout so they appear in docker logs - Extend error flash from 5s to 15s so errors are readable - Replace sendBeacon (POST-only) with keepalive fetch (PUT) on unload — sendBeacon was hitting 404s on all three unload saves Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
30 lines
575 B
JavaScript
30 lines
575 B
JavaScript
let fs = require('fs');
|
|
let FileTask = require('./file_task').FileTask;
|
|
|
|
/**
|
|
@name jake
|
|
@namespace jake
|
|
*/
|
|
/**
|
|
@name jake.DirectoryTask
|
|
@constructor
|
|
@augments EventEmitter
|
|
@augments jake.Task
|
|
@augments jake.FileTask
|
|
@description A Jake DirectoryTask
|
|
|
|
@param {String} name The name of the directory to create.
|
|
*/
|
|
class DirectoryTask extends FileTask {
|
|
constructor(...args) {
|
|
super(...args);
|
|
if (fs.existsSync(this.name)) {
|
|
this.updateModTime();
|
|
}
|
|
else {
|
|
this.modTime = null;
|
|
}
|
|
}
|
|
}
|
|
|
|
exports.DirectoryTask = DirectoryTask;
|