xaizek / rocketgit (License: AGPLv3+) (since 2018-12-09)
Light and fast Git hosting solution suitable to serve both as a hub or as a personal code storage with its tickets, pull requests, API and much more.
Commit c7f0afb7efe367c88e6b52bcfdbb3eefba9afb9c

Get rid of 1 second delay in rg_exec2()
Author: xaizek
Author date (UTC): 2020-07-19 15:56
Committer name: xaizek
Committer date (UTC): 2020-07-30 21:15
Parent(s): 663feb3786387e5d020a4bd5bba9fd45575799dd
Signing key: 99DC5E4DB05F6BE2
Tree: 65db690e7935c457812a25f3413e0d9aa7f6c825
File Lines added Lines deleted
inc/util.inc.php 9 4
File inc/util.inc.php changed (mode: 100644) (index da2309d..cc1060f)
... ... function rg_exec2($a)
1412 1412 rg_exec2_helper_init($info); rg_exec2_helper_init($info);
1413 1413 } }
1414 1414
1415 $terminating = FALSE;
1415 1416 while (1) { while (1) {
1416 1417 // check if all commands are started // check if all commands are started
1417 1418 $now = time(); $now = time();
 
... ... function rg_exec2($a)
1455 1456 . print_r($info['ps'], TRUE)); . print_r($info['ps'], TRUE));
1456 1457
1457 1458 if ($info['ps']['running'] !== FALSE) { if ($info['ps']['running'] !== FALSE) {
1458 $done = FALSE;
1459 continue;
1459 if ($terminating) {
1460 $info['ps']['exitcode'] = @proc_close($info['a']);
1461 } else {
1462 $done = FALSE;
1463 continue;
1464 }
1460 1465 } }
1461 1466
1462 1467 @proc_close($info['a']); @proc_close($info['a']);
 
... ... function rg_exec2($a)
1591 1596
1592 1597 if (empty($rx) && empty($wx)) { if (empty($rx) && empty($wx)) {
1593 1598 $rg_util_debug && $rg_util_debug &&
1594 rg_log('DEBUG: No r/w events; sleeping...');
1595 sleep(1);
1599 rg_log('DEBUG: No r/w events; terminating...');
1600 $terminating = TRUE;
1596 1601 continue; continue;
1597 1602 } }
1598 1603
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/rocketgit

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/rocketgit

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master