SHOW:
|
|
- or go back to the newest paste.
1 | case class JobResolved(jobId: Int, | |
2 | jobType: JobTypeResolved, | |
3 | fireTime: DateTime, | |
4 | tempFiles: Seq[String], | |
5 | status: Status, | |
6 | retry: Int) | |
7 | ||
8 | val tempDir = util.Files.createTempDir() | |
9 | val ops = for { | |
10 | jobResolved <- Resolver.resolve(job) | |
11 | extractor <- Try(Extractor(jobResolved)) | |
12 | handler <- Try(Handler(jobResolved, tempDir)) | |
13 | } yield extractor.apply(handler) | |
14 | ops match { | |
15 | case Success(seq) => { | |
16 | logger.debug("Created new reporting files: ", seq) | |
17 | ... | |
18 | } | |
19 | case Failure(exn) => { | |
20 | logger.error("Unable to process the job: ", ex) | |
21 | ... | |
22 | } |