Antfarm constructor
Antfarm options
Factory method which returns an AutoFolderNest. If the auto managed directory does not exist, it is created.
Path of the folder as a string or an array of strings as _path segments.
af.createAutoFolderNest("outfolder")
// /Users/dominick/My Automanaged Directory/outfolder
af.createAutoFolderNest(["proofing", "others"])
// /Users/dominick/My Automanaged Directory/proofing/others
Factory method which returns a FolderNest.
Path of the folder.
Optional boolean flag to allow creation of folder if it does not exist.
var out_folder = af.createFolderNest("/Users/dominick/Desktop/My Folder/");
Factory method which returns an FtpNest.
Hostname or IP address of the FTP server.
Port number of the FTP server.
FTP account username.
FTP account password.
Frequency of re-checking FTP in minutes.
// Check FTP directory every 2 minutes
var my_ftp = af.createFtpNest("ftp.example.com", 21, "", "", 2);
Factory method to create and return an S3 nest.
var bucket = af.createS3Nest("my-bucket-_name", "", 1, true);
Factory method which returns a Tunnel.
Factory method which returns a WebhookNest.
The _path which is generated in the webhook's route. You can supply a string or array of strings.
HTTP method for this webhook. Choose "all" for any HTTP method.
Optional callback function to handle the request, for sending a custom response.
var webhook = af.createWebhookNest(["proof", "create"], "post");
var webhook = af.createWebhookNest(["proof", "create"], "post", function(req, res, job, nest){
res.setHeader("Content-Type", "application/json; charset=utf-8");
res.end(JSON.stringify({
job_name: job.getName(),
job_id: job.getId(),
message: "Proof created!"
}));
});
Load an entire directory of workflow modules.
Path to the workflow modules.
af.loadDir("./workflows");
Log messages into the antfarm logger.
The log level. 0 = debug, 1 = info, 2 = warning, 3 = error
Log message.
Instance which triggers the action being logged.
Array of of other involved instances.
job.e.log(1, `Transferred to Tunnel "${tunnel.getName()}".`, job, [oldTunnel]);
Generated using TypeDoc
Expose
Antfarm
.