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

Use shared memory instead of the filesystem #28

Closed
paragonie-scott opened this issue Jun 6, 2016 · 1 comment
Closed

Use shared memory instead of the filesystem #28

paragonie-scott opened this issue Jun 6, 2016 · 1 comment

Comments

@paragonie-scott
Copy link
Member

if (!\ISCLI) {
$cabinFile = \implode(DIRECTORY_SEPARATOR, [
ROOT,
'tmp',
'cabin.' . $active['name'] . '.offline.txt'
]);
if (\file_exists($cabinFile)) {
// There might be an automatic update in progress!
// Let's give it up to 15 seconds, but only as much time as is needed.
$iter = 0;
do {
if (!\file_exists($cabinFile)) {
break;
}
\usleep(100);
++$iter;
} while($iter < 15000);
\clearstatcache();
// If we're still in the middle of that process, let's not load anything else:
if (\file_exists($cabinFile)) {
echo \__('This Airship is currently docked for routine maintenance. Please try again later.'), "\n";
exit(255);
}
}
}

@paragonie-scott
Copy link
Member Author

After a bit of poking around, I've discovered the only sane solution right now is APCu. So, we're going with that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant