public bool GenerateThumbnails() { try { if (!this.failed) { Directory.CreateDirectory(this.workingDirectory); log.Debug("Generating thumbnails for job: " + this.jobToken); thumbGenerator = new ThumbnailGenerator(this.JobToken, this.workingDirectory, download); this.status = "Working"; taskSet.EnqueSimpleTask(thumbGenerator); return(true); } } catch (Exception ex) { log.Error("An error occured GenerateThumbnails: " + this.jobToken, ex); } return(false); }
public void CleanUp() { try { DirectoryInfo di = new DirectoryInfo(this.workingDirectory); foreach (var file in di.GetFiles()) { file.Delete(); } di.Delete(); this.passes.Clear(); this.taskSet = null; this.download = null; this.thumbGenerator = null; this.callbackUrl = null; this.cleaned = true; } catch (Exception ex) { log.Error("Failed to cleanup working directory", ex); } }
public bool GenerateThumbnails() { try { if (!this.failed) { Directory.CreateDirectory(this.workingDirectory); log.Debug("Generating thumbnails for job: " + this.jobToken); thumbGenerator = new ThumbnailGenerator(this.JobToken, this.workingDirectory, download); this.status = "Working"; taskSet.EnqueSimpleTask(thumbGenerator); return true; } } catch (Exception ex) { log.Error("An error occured GenerateThumbnails: " + this.jobToken, ex); } return false; }
public void CleanUp() { try { DirectoryInfo di = new DirectoryInfo(this.workingDirectory); foreach (var file in di.GetFiles()) { file.Delete(); } di.Delete(); this.passes.Clear(); this.taskSet = null; this.download = null; this.thumbGenerator = null; this.callbackUrl = null; this.cleaned = true; } catch (Exception ex) { log.Error("Failed to cleanup working directory", ex); } }