use Cubist\Util\Files\Files;
class ProcessFile extends \Fluidbook\Tools\Jobs\ProcessFile {
- protected const DISTANT_ROOT = '/application/fluidbook/docs/';
+ protected const DISTANT_ROOTS = ['/application/fluidbook/docs/', '/application/protected/fluidbookpublication/docs/'];
protected const LOCAL_ROOT = '/files/';
- protected const US_DISTANT_ROOT = '/application/usstorage/docs/';
+ protected const US_DISTANT_ROOTS = ['/application/usstorage/docs/'];
protected const US_LOCAL_ROOT = '/usfiles/';
/**
public function getOut() {
if ($this->getRegion() === 'UE') {
- return str_replace(self::DISTANT_ROOT, self::LOCAL_ROOT, $this->getDistantOut());
+ foreach (self::DISTANT_ROOTS as $dr) {
+ return str_replace($dr, self::LOCAL_ROOT, $this->getDistantOut());
+ }
} else {
- return str_replace(self::US_DISTANT_ROOT, self::US_LOCAL_ROOT, $this->getDistantOut());
+ foreach (self::US_DISTANT_ROOTS as $dr) {
+ return str_replace($dr, self::US_LOCAL_ROOT, $this->getDistantOut());
+ }
+
}
}
public function process() {
if ($this->getRegion() === 'UE') {
- return str_replace(self::LOCAL_ROOT, self::DISTANT_ROOT, $this->getPath($this->isForce()));
+ return str_replace(self::LOCAL_ROOT, self::DISTANT_ROOTS[0], $this->getPath($this->isForce()));
} else {
- return str_replace(self::US_LOCAL_ROOT, self::US_DISTANT_ROOT, $this->getPath($this->isForce()));
+ return str_replace(self::US_LOCAL_ROOT, self::US_DISTANT_ROOTS[0], $this->getPath($this->isForce()));
}
}
public function getPdf(): string|null {
$res = Files::firstThatExists($this->getOut() . '/crop.pdf', $this->getOut() . '/fixed.pdf', $this->getOut() . '/original.pdf');
- if(null===$res) {
+ if (null === $res) {
echo 'no pdf in ' . $this->getOut();
}
return $res;
ssh root@brazil.cubedesigners.com "/docker/fluidbook-processfarm/update"
ssh root@clockwork.cubedesigners.com "/docker/fluidbook-processfarm/update"
ssh root@dracula.cubedesigners.com "/docker/fluidbook-processfarm/update"
+ssh root@dobermann.cubedesigners.com "/docker/fluidbook-processfarm/update"
ssh root@192.168.10.5 -p 22822 "/docker/fluidbook-processfarm/update"
ssh root@fastandfurious.cubedesigners.com -p 22822 "/docker/fluidbook-processfarm/update"
ssh root@godzilla.cubedesigners.com "/docker/fluidbook-processfarm/update"
ssh root@brazil.cubedesigners.com "chmod 755 /docker/fluidbook-processfarm/updatecode;/docker/fluidbook-processfarm/updatecode"
ssh root@clockwork.cubedesigners.com "chmod 755 /docker/fluidbook-processfarm/updatecode;/docker/fluidbook-processfarm/updatecode"
ssh root@dracula.cubedesigners.com "chmod 755 /docker/fluidbook-processfarm/updatecode;/docker/fluidbook-processfarm/updatecode"
+ssh root@dobermann.cubedesigners.com "chmod 755 /docker/fluidbook-processfarm/updatecode;/docker/fluidbook-processfarm/updatecode"
ssh root@192.168.10.5 -p 22822 "chmod 755 /docker/fluidbook-processfarm/updatecode;/docker/fluidbook-processfarm/updatecode"
ssh root@fastandfurious.cubedesigners.com -p 22822 "chmod 755 /docker/fluidbook-processfarm/updatecode;/docker/fluidbook-processfarm/updatecode"
ssh root@godzilla.cubedesigners.com "chmod 755 /docker/fluidbook-processfarm/updatecode;/docker/fluidbook-processfarm/updatecode"