Skip to content
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.

Commit

Permalink
Merge branch 'master' of https://github.com/wso2/private-paas
Browse files Browse the repository at this point in the history
  • Loading branch information
sajhak committed May 29, 2014
2 parents d67ca50 + a849d33 commit cf47800
Show file tree
Hide file tree
Showing 6 changed files with 339 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ function update_hosts_file(){
&& print_message "Updated /etc/hosts file with: ${STRATOS_LB_IP} ${instance_hostname}")) \
|| print_error "Failed to update '/etc/hosts' file. "

<%- if @stratos_instance_data_worker_host_name -%>
worker_hostname="<%= @stratos_instance_data_worker_host_name %>"
(${GREP} -q " ${worker_hostname}" /etc/hosts || (${ECHO} "${STRATOS_LB_IP} ${worker_hostname} # Stratos LB worker private IP" >> /etc/hosts \
&& print_message "Updated /etc/hosts file with: ${STRATOS_LB_IP} ${worker_hostname}")) \
|| print_error "Failed to update '/etc/hosts' file. "
<%- end -%>

if [[ "${STRATOS_SERVICE_NAME}" = "apistore" || "${STRATOS_SERVICE_NAME}" = "publisher" ]] ; then
gateway_host_name="<%= @stratos_instance_data_gateway_host_name %>"
gateway_mgt_host_name="<%= @stratos_instance_data_gateway_mgt_host_name %>"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public void run() {

// Check repo url
String repoUrl = CartridgeAgentConfiguration.getInstance().getRepoUrl();
if(CartridgeAgentConfiguration.getInstance().isMultitenant()) {
/*if(CartridgeAgentConfiguration.getInstance().isMultitenant()) {
if (CartridgeAgentConfiguration.getInstance().isCommitsEnabled()) {
log.info(" Commits enabled. Starting File listener ");
ScheduledExecutorService scheduler = Executors
Expand All @@ -123,7 +123,7 @@ public void run() {
// CartridgeAgentConfiguration.getInstance().getAppPath()+ "/repository/deployment/server/"
// ),
// 0, 10, TimeUnit.SECONDS);
}
} */

if ("null".equals(repoUrl) || StringUtils.isBlank(repoUrl)) {
if (log.isInfoEnabled()) {
Expand All @@ -136,27 +136,27 @@ public void run() {
CartridgeAgentEventPublisher.publishInstanceActivatedEvent();
} else {
//Start periodical file checker task
if (CartridgeAgentConfiguration.getInstance().isCommitsEnabled()) {
/*if (CartridgeAgentConfiguration.getInstance().isCommitsEnabled()) {
log.info(" Commits enabled. Starting File listener ");
ScheduledExecutorService scheduler = Executors
.newScheduledThreadPool(1);
scheduler.scheduleWithFixedDelay(new RepositoryFileListener(), 0,
10, TimeUnit.SECONDS);
}
} */
}

if (CartridgeAgentConfiguration.getInstance().isInternalRepo()) {
// Start periodic file copy for super tenant
// From repo/deployment/server to /tmp/-1234

ScheduledExecutorService scheduler = Executors
.newScheduledThreadPool(1);
scheduler.scheduleWithFixedDelay(
new ArtifactCopyTask(CartridgeAgentConfiguration.getInstance().getAppPath()
+ "/repository/deployment/server/",
CartridgeAgentConstants.SUPERTENANT_TEMP_PATH), 0,
10, TimeUnit.SECONDS);
}
// if (CartridgeAgentConfiguration.getInstance().isInternalRepo()) {
// // Start periodic file copy for super tenant
// // From repo/deployment/server to /tmp/-1234
//
// ScheduledExecutorService scheduler = Executors
// .newScheduledThreadPool(1);
// scheduler.scheduleWithFixedDelay(
// new ArtifactCopyTask(CartridgeAgentConfiguration.getInstance().getAppPath()
// + "/repository/deployment/server/",
// CartridgeAgentConstants.SUPERTENANT_TEMP_PATH), 0,
// 10, TimeUnit.SECONDS);
// }

String persistenceMappingsPayload = CartridgeAgentConfiguration.getInstance().getPersistenceMappings();
if (persistenceMappingsPayload != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ public void run() {
if(log.isDebugEnabled()) {
log.debug("Executing repository file listener");
}
boolean commitStatus = GitBasedArtifactRepository.getInstance().commit();
if(log.isDebugEnabled()) {
log.debug("Commit status: " + commitStatus);
}
//boolean commitStatus = GitBasedArtifactRepository.getInstance().commit();
//if(log.isDebugEnabled()) {
// log.debug("Commit status: " + commitStatus);
// }
}

}
Loading

0 comments on commit cf47800

Please sign in to comment.