1 |
package dk.daoas.adressevedligehold; |
package dk.daoas.adressevedligehold.fileupload; |
2 |
|
|
3 |
import org.apache.commons.lang3.exception.ExceptionUtils; |
import org.apache.commons.lang3.exception.ExceptionUtils; |
4 |
|
|
5 |
|
import dk.daoas.adressevedligehold.MailSender; |
6 |
|
import dk.daoas.adressevedligehold.ReloadHelper; |
7 |
|
import dk.daoas.adressevedligehold.afstandandenrute.AfstandAndenRuteTask; |
8 |
import dk.daoas.adressevedligehold.tasks.Task; |
import dk.daoas.adressevedligehold.tasks.Task; |
9 |
import dk.daoas.adressevedligehold.tasks.TaskLogger; |
import dk.daoas.adressevedligehold.tasks.TaskLogger; |
10 |
import dk.daoas.adressevedligehold.util.TimingHelper; |
import dk.daoas.adressevedligehold.util.TimingHelper; |
11 |
|
|
12 |
/* |
/* |
|
* TODO: trigger indlæsning |
|
13 |
* |
* |
14 |
*/ |
*/ |
15 |
|
|
68 |
addrManager.dumpChanged(); |
addrManager.dumpChanged(); |
69 |
} |
} |
70 |
|
|
71 |
AddressReport report = new AddressReport(addrManager, entryCount, ugedage, source, timer, writeBack); |
AddressReport report = new AddressReport(addrManager, entryCount, ugedage, source, timer, writeBack, addrManager.getDuplicateCount() ); |
72 |
report.sendRapport(); |
report.sendRapport(); |
73 |
|
|
74 |
|
|
75 |
if (writeBack) { |
if (writeBack) { |
76 |
ReloadHelper.triggerReload( "Indlaesning/" + source.getDistributor() ); |
ReloadHelper.triggerReload( "Indlaesning/" + source.getDistributor() ); |
77 |
|
|
78 |
|
|
79 |
|
if (source.calculateDistances()) { |
80 |
|
Task tsk = new AfstandAndenRuteTask(source.getDistributor(), AfstandAndenRuteTask.INCREMENTAL); |
81 |
|
manager.submitTask( tsk ); |
82 |
|
} |
83 |
} |
} |
84 |
|
|
85 |
|
|
86 |
|
|
87 |
} catch(Exception e) { |
} catch(Exception e) { |
88 |
|
|
91 |
body += "<br><br>"; |
body += "<br><br>"; |
92 |
body += "Exception:<br>"; |
body += "Exception:<br>"; |
93 |
body += ExceptionUtils.getStackTrace(e); |
body += ExceptionUtils.getStackTrace(e); |
94 |
AddressReport.sendMail(subject, body); |
MailSender.sendMail(subject, body); |
95 |
|
|
96 |
throw e; //rethrow exception |
throw e; //rethrow exception |
97 |
} finally { |
} finally { |