fixed busy, busy was handled as failed and not retry
This commit is contained in:
parent
a92c449c71
commit
1c8635dee0
Binary file not shown.
|
|
@ -776,14 +776,32 @@ public class Mail2FaxBlock implements IBaseExecutable {
|
||||||
Object exitStatus = exitStatusField.get(sendFaxBlock);
|
Object exitStatus = exitStatusField.get(sendFaxBlock);
|
||||||
log.info("Mail2Fax: SendFax exitStatus: " + exitStatus);
|
log.info("Mail2Fax: SendFax exitStatus: " + exitStatus);
|
||||||
|
|
||||||
if (exitStatus != null && exitStatus.toString().contains("FAILED")) {
|
if (exitStatus != null) {
|
||||||
return FAX_RETRY;
|
String status = exitStatus.toString();
|
||||||
|
|
||||||
|
// BUSY, FAILED oder andere temporäre Fehler → Retry
|
||||||
|
if (status.contains("BUSY") || status.contains("FAILED") ||
|
||||||
|
status.contains("NO_ANSWER") || status.contains("TIMEOUT")) {
|
||||||
|
log.info("Mail2Fax: Temporärer Fehler (" + status + "), wird zur Retry-Queue hinzugefügt");
|
||||||
|
return FAX_RETRY;
|
||||||
|
}
|
||||||
|
|
||||||
|
// SENT → Erfolg
|
||||||
|
if (status.contains("SENT")) {
|
||||||
|
log.info("Mail2Fax: Fax erfolgreich gesendet an " + destination);
|
||||||
|
return FAX_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unbekannter Status → als Fehler behandeln
|
||||||
|
log.warn("Mail2Fax: Unbekannter exitStatus: " + status);
|
||||||
|
return FAX_FAIL;
|
||||||
}
|
}
|
||||||
} catch (NoSuchFieldException e) {
|
} catch (NoSuchFieldException e) {
|
||||||
log.debug("Mail2Fax: Kein exitStatus Feld");
|
log.debug("Mail2Fax: Kein exitStatus Feld");
|
||||||
}
|
}
|
||||||
|
|
||||||
log.info("Mail2Fax: Fax erfolgreich gesendet an " + destination);
|
// Kein exitStatus gefunden → als Erfolg annehmen (Fallback)
|
||||||
|
log.info("Mail2Fax: Fax gesendet an " + destination + " (kein exitStatus verfügbar)");
|
||||||
return FAX_SUCCESS;
|
return FAX_SUCCESS;
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue