mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Action Tracking Service update
Keep a record of which machine an action is currently running on, so for a cluster situation you know where you actions are git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@21482 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
*/
|
||||
package org.alfresco.repo.action;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
@@ -409,16 +411,25 @@ public class ActionTrackingServiceImpl implements ActionTrackingService
|
||||
*/
|
||||
protected static ExecutionDetails buildExecutionDetails(Action action)
|
||||
{
|
||||
// TODO Where are we?
|
||||
String machine = "TODO";
|
||||
// Where are we running?
|
||||
if(machineName == null) {
|
||||
try {
|
||||
InetAddress localhost = InetAddress.getLocalHost();
|
||||
machineName = localhost.getHostAddress() + " : " +
|
||||
localhost.getHostName();
|
||||
} catch(UnknownHostException e) {
|
||||
machineName = "(machine details unavailable - server IP not known)";
|
||||
}
|
||||
}
|
||||
|
||||
// Generate
|
||||
return new ExecutionDetails(
|
||||
buildExecutionSummary(action),
|
||||
action.getNodeRef(), machine,
|
||||
action.getNodeRef(), machineName,
|
||||
action.getExecutionStartDate(), false
|
||||
);
|
||||
}
|
||||
private static String machineName = null;
|
||||
|
||||
/**
|
||||
* Turns a cache key back into its constituent
|
||||
|
Reference in New Issue
Block a user