List of commits:
Subject Hash Author Date (UTC)
Remove rg_log_buf stuff because of performance issues e85f70b38c197d44a9b4878dcff78da4f4f56562 Catalin(ux) M. BOIE 2017-08-08 20:08:56
Use a more efficient way to log multi line strings 67923e6760bf26923bd7ce9c9bced7a3f526cecf Catalin(ux) M. BOIE 2017-08-08 19:54:00
css: make border more visible 378b328cde875d1584f3df6d8635b340ee23207a Catalin(ux) M. BOIE 2017-07-22 23:27:29
struct: add itime for commit_labels 67d189b9d3330ab4dc3b6a0580a736522b6c1d36 Catalin(ux) M. BOIE 2017-07-22 23:05:02
wh: builder: we need repo info for clone_url_ssh info 6e95861b22476b0857f98a49025fc060302c2a3f Catalin(ux) M. BOIE 2017-07-22 12:35:52
hints: ssh: make more clear that ssh must be restarted 8c35f89b323d3ea28fad79f4c32d78aadc8618f6 Catalin(ux) M. BOIE 2017-07-22 08:17:37
rg_authorize must be run as rocketgit user - fix permissions to 0755 80db46ae953b72ba521b3cd96c91602e127fc8f8 Catalin(ux) M. BOIE 2017-07-22 08:07:56
build_jobs: Columns with no defaults must be specified bbb1c0036be3c6180d84e0641f41aa60ae1905f1 Catalin(ux) M. BOIE 2017-07-20 20:34:32
Show the suggestion to use https correctly 9656ff5ec3bfe65fc7a573fae254483c31d88501 Catalin(ux) M. BOIE 2017-07-10 20:57:26
rg_template_eval_cond: now supports more operations 2155bedec6e82343d84c8c504c0beb68fdf01dea Catalin(ux) M. BOIE 2017-07-10 20:55:48
Minor corrections dc3ce904f00ce5903ac5614ac870a0529d22ee4a Catalin(ux) M. BOIE 2017-07-10 20:55:03
state_get: Return empty if the state table does not exists 35822bff104ba2133f29a0a69cff4603d990a721 Catalin(ux) M. BOIE 2017-07-09 19:18:11
duilder: add 'samples' dir to the docs 8762f7dbfcec1f3ed5d6d7ba7dbf0ed547a894b7 Catalin(ux) M. BOIE 2017-07-09 06:54:06
Bump version to 0.70 a3524c87b21d22d734626503683e80e51abd574c Catalin(ux) M. BOIE 2017-07-09 06:40:24
Added nginx next to apache 982e6536f5204a07c939b01229784a46c18cdada Catalin(ux) M. BOIE 2017-07-09 06:38:55
rg_exec: when stdout closes, we should not try to get input anymore from the external program b550d45c19c48235eddbd5b6fdcadcec2689065b Catalin(ux) M. BOIE 2017-07-09 06:38:32
Small corrections 68c2120f6bb1cd04e3c35b18fee8c2ce89c525bb Catalin(ux) M. BOIE 2017-07-09 06:36:59
tests: deal with the case when ControlMaster is not 'no' 7fc439c93b2e9df218292d20fbe50606d770955f Catalin(ux) M. BOIE 2017-07-09 06:35:36
Do not use http_host anymore af14b07381106cbc015aa6620d587b7e64ce7ed5 Catalin(ux) M. BOIE 2017-07-09 06:34:32
ssh_host and git_host must not depend on http host 4677add26d7c03541cdd412d9fdc420ec79867b2 Catalin(ux) M. BOIE 2017-07-09 06:31:52
Commit e85f70b38c197d44a9b4878dcff78da4f4f56562 - Remove rg_log_buf stuff because of performance issues
Author: Catalin(ux) M. BOIE
Author date (UTC): 2017-08-08 20:08
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2017-08-08 20:21
Parent(s): 67923e6760bf26923bd7ce9c9bced7a3f526cecf
Signer:
Signing key:
Signing status: N
Tree: a447d8bff7688388b07d9c20d6ac1588e2f0c5f0
File Lines added Lines deleted
inc/log.inc.php 19 36
scripts/builder.php 0 2
scripts/cache.php 0 2
scripts/events.php 0 2
scripts/worker.php 0 1
File inc/log.inc.php changed (mode: 100644) (index 20ce4ff..f46c541)
... ... if (!isset($rg_log_file))
10 10
11 11 $rg_log_fd = FALSE; $rg_log_fd = FALSE;
12 12 $rg_log_sid = rg_id(6); $rg_log_sid = rg_id(6);
13 $rg_log_buf = "";
14 13 $rg_log_last_date = ""; $rg_log_last_date = "";
15 14 $rg_log_level = 0; $rg_log_level = 0;
16 15
17 /*
18 * Clears 'rg_log_buf' to not send a big log in case of errors
19 */
20 function rg_log_buffer_clear()
21 {
22 global $rg_log_buf;
23
24 $rg_log_buf = "";
25 }
26
27 16 /* /*
28 17 * Allow forcing sid, so we can spread the logs to multiple file * Allow forcing sid, so we can spread the logs to multiple file
29 18 * or to supress the output of it. * or to supress the output of it.
 
... ... function rg_log_set_sid($v)
34 23 $rg_log_sid = $v; $rg_log_sid = $v;
35 24 } }
36 25
37 /*
38 * When we generate fatal/warn e-mails, we need to insert also the logs.
39 */
40 function rg_log_buffer()
41 {
42 global $rg_log_buf;
43 return $rg_log_buf;
44 }
45
46 26 function rg_log_set_file($file) function rg_log_set_file($file)
47 27 { {
48 28 global $rg_log_file; global $rg_log_file;
 
... ... function rg_log($str)
56 36 global $rg_log_file; global $rg_log_file;
57 37 global $rg_log_fd; global $rg_log_fd;
58 38 global $rg_log_sid; global $rg_log_sid;
59 global $rg_log_buf;
60 39 global $rg_log_last_date; global $rg_log_last_date;
61 40
62 41 $date = gmdate("Ymd"); $date = gmdate("Ymd");
 
... ... function rg_log($str)
104 83 $str2 = 'could not log data'; $str2 = 'could not log data';
105 84 $buf .= $buf0 . ' ' . $spaces . $str2 . "\n"; $buf .= $buf0 . ' ' . $spaces . $str2 . "\n";
106 85
107 $rg_log_buf .= $buf;
108
109 86 fwrite($rg_log_fd, $buf); fwrite($rg_log_fd, $buf);
110 87 } }
111 88
 
... ... $rg_error_core_seen = array();
137 114 function rg_error_core($msg) function rg_error_core($msg)
138 115 { {
139 116 global $rg_log_dir; global $rg_log_dir;
117 global $rg_log_sid;
140 118 global $rg_admin_email; global $rg_admin_email;
141 119 global $rg_error_core_seen; global $rg_error_core_seen;
142 120
143 121 rg_log($msg); rg_log($msg);
144 122
145 $me = isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : "?";
146
147 $bt = print_r(debug_backtrace(), TRUE);
148 $bt = substr($bt, 0, 1024 * 1024);
149
150 $dir = $rg_log_dir;
151
152 123 $key = md5($msg); $key = md5($msg);
153 124 if (isset($rg_error_core_seen[$key])) if (isset($rg_error_core_seen[$key]))
154 125 return; return;
155 126
156 $r = file_put_contents($dir . "/err-" . $key,
157 "Script: " . $me . "\n" . rg_log_buffer() . "\n\n" . $bt,
158 FILE_APPEND);
159 if ($r === FALSE)
160 return;
161 chmod($dir . "/err-" . $key, 0600);
127 $me = isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : "?";
128
129 $dir = $rg_log_dir;
130
131 // First, log small backtrace, then full backtrace
132 $_a = array(DEBUG_BACKTRACE_IGNORE_ARGS, 0);
133 foreach ($_a as $_v) {
134 $bt = print_r(debug_backtrace($_v), TRUE);
135 $r = @file_put_contents($dir . "/err-" . $key,
136 'Script: ' . $me . "\n"
137 . 'log_sid: ' . $rg_log_sid . "\n"
138 . 'Date: ' . gmdate('Y-m-d H:i:s') . "\n"
139 . $bt . "\n",
140 FILE_APPEND);
141 if ($r === FALSE)
142 return;
143 chmod($dir . "/err-" . $key, 0600);
144 }
162 145
163 146 $rg_error_core_seen[$key] = 1; $rg_error_core_seen[$key] = 1;
164 147 } }
File scripts/builder.php changed (mode: 100644) (index 7714591..40a46fc)
... ... $jobs = array();
360 360 $workers = 0; $workers = 0;
361 361 $original_mtime = @filemtime(__FILE__); $original_mtime = @filemtime(__FILE__);
362 362 do { do {
363 rg_log_buffer_clear();
364
365 363 // We do not want stale entries! // We do not want stale entries!
366 364 rg_cache_core_destroy(); rg_cache_core_destroy();
367 365
File scripts/cache.php changed (mode: 100644) (index 16fe053..9e8b40a)
... ... if ($r === FALSE) {
335 335 $conn_table = array("r" => array(), "w" => array(), "conns" => array()); $conn_table = array("r" => array(), "w" => array(), "conns" => array());
336 336 $conn_table['r']['master'] = $master; $conn_table['r']['master'] = $master;
337 337 do { do {
338 rg_log_buffer_clear();
339
340 338 //rg_log_ml("conn_table: " . print_r($conn_table, TRUE)); //rg_log_ml("conn_table: " . print_r($conn_table, TRUE));
341 339
342 340 $r2 = $conn_table['r']; $w2 = $conn_table['w']; $ex = array(); $r2 = $conn_table['r']; $w2 = $conn_table['w']; $ex = array();
File scripts/events.php changed (mode: 100644) (index 7e6fe2b..6fafef7)
... ... $conn_table['r']['master'] = $socket;
109 109 $original_mtime = @filemtime(__FILE__); $original_mtime = @filemtime(__FILE__);
110 110 $notify_list = array(); $notify_list = array();
111 111 do { do {
112 rg_log_buffer_clear();
113
114 112 // Check our mtime so we can upgrade the software and this script // Check our mtime so we can upgrade the software and this script
115 113 // will restart. // will restart.
116 114 clearstatcache(); clearstatcache();
File scripts/worker.php changed (mode: 100644) (index ca9fb59..504ed4a)
... ... rg_conn_enq('master', 'ANN ' . rg_conn_prepare($ann) . "\n");
545 545 $jobs = array(); $jobs = array();
546 546 $pid_to_jid = array(); $pid_to_jid = array();
547 547 while(1) { while(1) {
548 rg_log_buffer_clear();
549 548 rg_conn_wait(3); rg_conn_wait(3);
550 549
551 550 // Verify if the jobs are started // Verify if the jobs are started
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://rocketgit.com/user/catalinux/rocketgit

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/catalinux/rocketgit

Clone this repository using git:
git clone git://git.rocketgit.com/user/catalinux/rocketgit

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