return m_reportService.insertDailyReport(report, binaryContent);
}
@Override
public boolean buildHourlyTask(String name, String domain, Date start) {
BugReport bugReport = new BugReport(Constants.CAT);
ProblemReportVisitor visitor = new ProblemReportVisitor().setReport(bugReport);
Date end = new Date(start.getTime() + TimeHelper.ONE_HOUR);
Set<String> domains = m_reportService.queryAllDomainNames(start, end, ProblemAnalyzer.ID);
for (String domainName : domains) {
if (validateDomain(domainName)) {
ProblemReport problemReport = m_reportService.queryProblemReport(domainName, start, end);
visitor.visitProblemReport(problemReport);
}
}
for (Domain d : bugReport.getDomains().values()) {
d.setProblemUrl(String.format("http://%s/cat/r/p?domain=%s&date=%s", getDomainName(), d.getId(),
m_hourly_formate.format(start)));
}
HourlyReport report = new HourlyReport();