Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Rework core.mq for options management, handling of "internal" ip's an…
Browse files Browse the repository at this point in the history
…d ports, binary path moved from core.ajaxplorer to core.mq.

NSQ parameters are still not yet taken into account.
  • Loading branch information
cdujeu committed Aug 28, 2016
1 parent 87cd505 commit eb5afdb
Show file tree
Hide file tree
Showing 9 changed files with 709 additions and 332 deletions.
7 changes: 4 additions & 3 deletions core/src/core/src/pydio/Core/Controller/CliRunner.php
Expand Up @@ -129,12 +129,13 @@ public static function applyActionInBackground(ContextInterface $ctx, $actionNam
/**
* @param $cmd
* @param $logFile
* @param $forceLog
* @return UnixProcess|null
*/
public static function runCommandInBackground($cmd, $logFile)
public static function runCommandInBackground($cmd, $logFile, $forceLog = false)
{
if (PHP_OS == "WIN32" || PHP_OS == "WINNT" || PHP_OS == "Windows") {
if (AJXP_SERVER_DEBUG) $cmd .= " > " . $logFile;
if (AJXP_SERVER_DEBUG || $forceLog) $cmd .= " > " . $logFile;
if (class_exists("COM") && ConfService::getGlobalConf("CLI_USE_COM")) {
$WshShell = new \COM("WScript.Shell");
$WshShell->Run("cmd /C $cmd", 0, false);
Expand All @@ -149,7 +150,7 @@ public static function runCommandInBackground($cmd, $logFile)
}
return null;
} else {
$process = new UnixProcess($cmd, (AJXP_SERVER_DEBUG ? $logFile : null));
$process = new UnixProcess($cmd, (AJXP_SERVER_DEBUG || $forceLog ? $logFile : null));
Logger::debug("Starting process and sending output dev null");
return $process;
}
Expand Down
4 changes: 2 additions & 2 deletions core/src/core/src/pydio/Core/Services/ApiKeysService.php
Expand Up @@ -112,11 +112,11 @@ public static function generatePairForAdminTask($adminTaskId, $userId, $restrict
* @return array|null
* @throws PydioException
*/
public static function findPairForAdminTask($adminTaskId, $userId){
public static function findPairForAdminTask($adminTaskId, $userId = ""){

$keys = self::getStore()->simpleStoreList("keystore", $cursor, "", "serial", '%"ADMIN_TASK_ID";s:' . strlen($adminTaskId) . ':"' . $adminTaskId . '"%');
foreach($keys as $kId => $kData){
if($kData["USER_ID"] === $userId){
if(empty($userId) || $kData["USER_ID"] === $userId){
return ["t" => $kId, "p" => $kData["PRIVATE"]];
}
}
Expand Down
1 change: 0 additions & 1 deletion core/src/plugins/core.ajaxplorer/manifest.xml
Expand Up @@ -30,7 +30,6 @@
<global_param name="WEBDAV_BROWSER_LISTING" group="CONF_MESSAGE[WebDAV Server]" type="boolean" label="CONF_MESSAGE[Browser Access]" description="CONF_MESSAGE[Display the list of files and folder when accessing through the browser]" mandatory="false" default="false"/>
<global_param name="CMDLINE_ACTIVE" group="CONF_MESSAGE[Command Line]" type="boolean" label="CONF_MESSAGE[Command-line Active]" description="CONF_MESSAGE[Use Pydio framework via the command line, allowing CRONTAB jobs or background actions.]" mandatory="false" default="false"/>
<global_param name="CLI_PHP" group="CONF_MESSAGE[Command Line]" type="string" label="CONF_MESSAGE[Command-line PHP]" description="CONF_MESSAGE[On specific hosts, you may have to use a specific path to access the php command line]" mandatory="false" default="php"/>
<global_param name="CLI_PYDIO" group="CONF_MESSAGE[Command Line]" type="string" label="CONF_MESSAGE[Command-line Pydio]" description="CONF_MESSAGE[On specific hosts, you may have to use a specific path to access the pydio command line]" mandatory="false" default="pydio"/>
<global_param name="CLI_USE_COM" group="CONF_MESSAGE[Command Line]" type="boolean" label="CONF_MESSAGE[Use COM class]" description="CONF_MESSAGE[On Windows running IIS, set this option to true if the COM extension is loaded, this may enable the use of the php command line.]" mandatory="false" default="false"/>
<global_param name="DISABLE_ZIP_BROWSING" group="CONF_MESSAGE[Compression Features]" type="boolean" label="CONF_MESSAGE[Disable Zip browsing]" description="CONF_MESSAGE[Disable Zip files inline browsing. This can be necessary if you always store huge zip archives: it can have some impact on performance.]" mandatory="false" default="false"/>
<global_param name="ZIP_CREATION" expose="true" group="CONF_MESSAGE[Compression Features]" type="boolean" label="CONF_MESSAGE[Zip Creation]" description="CONF_MESSAGE[If you encounter problems with online zip creation or multiple files downloading, you can disable the feature.]" mandatory="false" default="true"/>
Expand Down
11 changes: 11 additions & 0 deletions core/src/plugins/core.mq/composer.json
@@ -0,0 +1,11 @@
{
"name": "Internal Messaging",
"description": "Dispatch and collect messages inside the application or using external booster tool.",
"homepage": "https://pydio.com/",
"license":"AGPL-3.0",
"autoload": {
"psr-4": {
"Pydio\\Mq\\Core\\": "./src"
}
}
}
72 changes: 47 additions & 25 deletions core/src/plugins/core.mq/manifest.xml

Large diffs are not rendered by default.

0 comments on commit eb5afdb

Please sign in to comment.