Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev: web api scaffolding #64

Merged
merged 10 commits into from
May 15, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
timeout nonblocking
  • Loading branch information
citelao committed Feb 20, 2015
commit 446eee1d0f06b6f18c83dabf57a115e3ffbeb869
13 changes: 13 additions & 0 deletions include/setup/client_callback.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<html>
<head>
<title>Spotifious Setup</title>

<link rel="stylesheet" href="style/normalize.css" />
<link rel="stylesheet" href="style/style.css">
</head>
<body>
<div id="wrapper" class="wrapper">
<h1>Thanks!</h1>
</div>
</body>
</html>
11 changes: 9 additions & 2 deletions src/citelao/OhAlfred/Command/Timeout.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
<?php
namespace OhAlfred\Command;

use OhAlfred\OhAlfred;

class Timeout {
protected $script;
protected $alfred;

public function __construct($timeout, $command) {
$script = $command;
$script = "(";

$script .= $command;

$script .= " && sleep $timeout; kill -9 \$!) > /dev/null 2>/dev/null &";

$script .= " & sleep $timeout; kill -9 \$!";
echo($script);

$this->script = $script;
}
Expand Down
2 changes: 1 addition & 1 deletion src/citelao/Spotifious/Spotifious.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public function process($action) {

} else if($command == 'appsetup') {
// Autokill server in 10 minutes
$server = new Timeout(5 * 60, "php -S localhost:11114 & open 'http:https://localhost:11114/include/setup/index.php'");
$server = new Timeout(5 * 5, "php -S localhost:11114 & open 'http:https://localhost:11114/include/setup/index.php'");
$server->run();


Expand Down