Skip to content

Commit

Permalink
Merge pull request #1408 from RunOnFlux/development
Browse files Browse the repository at this point in the history
v5.28.1
  • Loading branch information
TheTrunk authored Oct 2, 2024
2 parents b93a5bf + df5e553 commit 83ca664
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
25 changes: 22 additions & 3 deletions ZelBack/src/services/appsService.js
Original file line number Diff line number Diff line change
Expand Up @@ -1997,7 +1997,7 @@ async function createAppVolume(appSpecifications, appName, isComponent, res) {
res.write(serviceHelper.ensureString(makeDirectory));
if (res.flush) res.flush();
}
const execDIR = `sudo mkdir -p ${appsFolder + appId}/appdata`;
const execDIR = `sudo mkdir -p ${appsFolder + appId}`;
await cmdAsync(execDIR);
const makeDirectory2 = {
status: 'Directory made',
Expand Down Expand Up @@ -2030,6 +2030,25 @@ async function createAppVolume(appSpecifications, appName, isComponent, res) {
if (res.flush) res.flush();
}

const makeDirectoryB = {
status: 'Making application data directory...',
};
log.info(makeDirectoryB);
if (res) {
res.write(serviceHelper.ensureString(makeDirectoryB));
if (res.flush) res.flush();
}
const execDIR2 = `sudo mkdir -p ${appsFolder + appId}/appdata`;
await cmdAsync(execDIR2);
const makeDirectoryB2 = {
status: 'Application data directory made',
};
log.info(makeDirectoryB2);
if (res) {
res.write(serviceHelper.ensureString(makeDirectoryB2));
if (res.flush) res.flush();
}

const permissionsDirectory = {
status: 'Adjusting permissions...',
};
Expand Down Expand Up @@ -3727,7 +3746,7 @@ async function registerAppLocally(appSpecs, componentSpecs, res, test = false) {
await fluxCommunicationMessagesSender.broadcastMessageToOutgoing(newAppRunningMessage);
await serviceHelper.delay(500);
await fluxCommunicationMessagesSender.broadcastMessageToIncoming(newAppRunningMessage);
// broadcast messages about running apps to all peers
// broadcast messages about running apps to all peers
}

// all done message
Expand Down Expand Up @@ -12239,7 +12258,7 @@ async function testAppMount() {
log.info('Mount Test: Filesystem created');
log.info('Mount Test: Making directory...');

const execDIR = `sudo mkdir -p ${appsFolder + appId}/appdata`;
const execDIR = `sudo mkdir -p ${appsFolder + appId}`;
await cmdAsync(execDIR);
log.info('Mount Test: Directory made');
log.info('Mount Test: Mounting volume...');
Expand Down
6 changes: 6 additions & 0 deletions ZelBack/src/services/fluxCommunicationMessagesSender.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ async function sendToAllPeers(data, wsList) {
*/
async function sendToRandomPeer(data) {
try {
if (!outgoingConnections.length) {
return;
}
const removals = [];
const client = outgoingConnections[Math.floor(Math.random() * outgoingConnections.length)];
try {
Expand Down Expand Up @@ -195,6 +198,9 @@ async function sendToAllIncomingConnections(data, wsList) {
*/
async function sendToRandomIncomingConnections(data) {
try {
if (!incomingConnections.length) {
return;
}
const removals = [];
const client = incomingConnections[Math.floor(Math.random() * incomingConnections.length)];
try {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "flux",
"version": "5.28.0",
"version": "5.28.1",
"description": "Flux, Your Gateway to a Decentralized World",
"repository": {
"type": "git",
Expand Down

0 comments on commit 83ca664

Please sign in to comment.