List of commits:
Subject Hash Author Date (UTC)
Fix for a bug preventing partition table to be created in advance 51049495934efa8c7bca710c6f2538f34bc4de9a Catalin(ux) M. BOIE 2020-08-20 04:03:49
cron fixes 910c74f83740da015d654193025cd6433324a1da Catalin(ux) M. BOIE 2020-08-20 03:41:07
replaced 'slave' with 'part' 348a2afcaedd77c7513b5e7dd05364f5e9ae7a87 Catalin(ux) M. BOIE 2020-08-20 03:40:43
Make cron tasks more resilient in case the machine is stopped afbe8607b4608862787bf696f71027beb345701f Catalin(ux) M. BOIE 2020-08-19 06:08:34
Cosmetic 21956573027d83eb45913b6bf30eeb57e602aea4 Catalin(ux) M. BOIE 2020-08-19 06:07:45
Added time of upload for artifacts fd33fe0aeef09f66d74f3ec1554312a2fa5e2642 Catalin(ux) M. BOIE 2020-08-19 06:06:54
css fixes for table scroll 77e486f3c9e3c9356985d3c21bc713d8a8d0e223 Catalin(ux) M. BOIE 2020-08-19 06:02:09
Added git repo size 9828b1fe96e2217ead8863f7a7c0ee3599d16633 Catalin(ux) M. BOIE 2020-08-19 06:01:27
Change artifacts path to be able to compute correct sizes efff16c88415dfca0a4b52981b44620e52778c03 Catalin(ux) M. BOIE 2020-08-19 05:56:17
Some state was not under transaction fd51b92442fb83fc6941f94b22236f5014f0062c Catalin(ux) M. BOIE 2020-08-19 03:24:28
Added artifacts size to repos and users tables 2a8469e3416e63e9bb21ba0e412583fc69fea115 Catalin(ux) M. BOIE 2020-08-19 03:23:58
No need to invalidate last part ts because we already check 75cf0ae1721d9473bb8df780cc61f5c6247a7a6c Catalin(ux) M. BOIE 2020-08-19 03:20:19
Fixed some spaces in profiling 929b95c5d842ffe306031f2ba99d23e435855155 Catalin(ux) M. BOIE 2020-08-18 07:11:30
Added a link to tutorials in the welcome mail 2ef5795e53a26fdc1f9a2adda7bbf7a4f4ccb81f Catalin(ux) M. BOIE 2020-08-17 07:08:15
Change the mail goal bffa2a1f9a4b185916b700b3e8455bbf6f7a82bf Catalin(ux) M. BOIE 2020-08-17 06:59:35
One of the tests was not ran bb295b59daee2158c1a9c435a267d4d2377d36e9 Catalin(ux) M. BOIE 2020-08-17 06:47:52
Doc improvement 039b77222a8fb6e38be0b9a35329c13f86c890af Catalin(ux) M. BOIE 2020-08-17 06:47:27
Fixed form generation test b1ca5d96c15271fbe8a595a22227d15f917779dc Catalin(ux) M. BOIE 2020-08-17 06:46:56
Do not allow adding bugs if not logged in 32db254689f7419fcea479985bbeff5cc579f7e7 Catalin(ux) M. BOIE 2020-08-17 06:45:46
markdown format improvements bc1cc389bc851af6d0fb186bcfaf47525e235b6b Catalin(ux) M. BOIE 2020-08-17 06:45:01
Commit 51049495934efa8c7bca710c6f2538f34bc4de9a - Fix for a bug preventing partition table to be created in advance
Author: Catalin(ux) M. BOIE
Author date (UTC): 2020-08-20 04:03
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2020-08-20 04:03
Parent(s): 910c74f83740da015d654193025cd6433324a1da
Signing key:
Tree: b8c23860adb098c43f555e513f2e22e9ff20f8ce
File Lines added Lines deleted
inc/struct.inc.php 16 21
File inc/struct.inc.php changed (mode: 100644) (index 891ff5e..36a5da1)
... ... function rg_sql_struct_parts_update($db)
887 887 if ($last_list === FALSE) if ($last_list === FALSE)
888 888 break; break;
889 889
890 // last_ts - last month created already
890 891 $last_ts = rg_state_get_uint($db, 'parts_create_last_ts'); $last_ts = rg_state_get_uint($db, 'parts_create_last_ts');
891 892 if ($last_ts === FALSE) if ($last_ts === FALSE)
892 893 break; break;
 
... ... function rg_sql_struct_parts_update($db)
894 895 $last_ts = gmmktime(0, 0, 0, gmdate('m') - 1, 1, gmdate('Y')); $last_ts = gmmktime(0, 0, 0, gmdate('m') - 1, 1, gmdate('Y'));
895 896 rg_log('DEBUG: last_ts=' . $last_ts . ' (' . gmdate('Y-m-d', $last_ts) . ')'); rg_log('DEBUG: last_ts=' . $last_ts . ' (' . gmdate('Y-m-d', $last_ts) . ')');
896 897
898 // goot_ts = What month should be covered?
899 $good_ts = gmmktime(0, 0, 0, gmdate('m') + 1, 1, gmdate('Y'));
900 rg_log('DEBUG: good_ts=' . $good_ts . ' (' . gmdate('Y-m-d', $good_ts) . ')');
901
897 902 $cur_list = sha1(rg_serialize($rg_sql_struct_parts)); $cur_list = sha1(rg_serialize($rg_sql_struct_parts));
898 903 rg_log('DEBUG: last_list=[' . $last_list . '] cur_list=[' . $cur_list . ']'); rg_log('DEBUG: last_list=[' . $last_list . '] cur_list=[' . $cur_list . ']');
899 904 if (strcmp($last_list, $cur_list) != 0) { if (strcmp($last_list, $cur_list) != 0) {
 
... ... function rg_sql_struct_parts_update($db)
904 909 break; break;
905 910 } }
906 911
907 // First second of current month
908 $current_month_ts = gmmktime(0, 0, 0, gmdate('m'), 1, gmdate('Y'));
909 rg_log('DEBUG: current_month_ts=' . $current_month_ts
910 . ' (' . gmdate('Y-m-d', $current_month_ts) . ')');
911
912 912 // Do we have current month and the next one covered? // Do we have current month and the next one covered?
913 if ($current_month_ts < $last_ts) {
914 rg_log('No update needed!');
915 $ret = TRUE;
913 if ($good_ts > $last_ts) {
914 rg_log('Update needed because good_ts > $last_ts');
915 $doit = TRUE;
916 916 break; break;
917 917 } }
918 918
919 rg_log('Update needed because current_month_ts >= $last_ts');
920 $doit = TRUE;
919 rg_log('No update needed!');
920 $ret = TRUE;
921 921 break; break;
922 922 } }
923 923
 
... ... function rg_sql_struct_parts_update($db)
938 938 $month = gmdate('m', $last_ts) + 1; $month = gmdate('m', $last_ts) + 1;
939 939 $year = gmdate('Y', $last_ts); $year = gmdate('Y', $last_ts);
940 940 $ts = gmmktime(0, 0, 0, $month, 1, $year); $ts = gmmktime(0, 0, 0, $month, 1, $year);
941 $stop_ts = gmmktime(0, 0, 0, gmdate('m') + 1, 1, gmdate('Y'));
942 rg_log('DEBUG: ts=' . $ts . ' stop_ts=' . $stop_ts . ' month=' . $month);
943 while ($ts <= $stop_ts) {
941 rg_log('DEBUG: ts=' . $ts . ' good_ts=' . $good_ts . ' month=' . $month);
942 while ($ts <= $good_ts) {
944 943 rg_log('DEBUG: ts=' . $ts); rg_log('DEBUG: ts=' . $ts);
945 944
946 945 $month++; $month++;
 
... ... function rg_sql_struct_parts_update($db)
952 951
953 952 // First, check if exists. It is possible that // First, check if exists. It is possible that
954 953 // we did the update but we could not set the cache. // we did the update but we could not set the cache.
955 $sql = 'SELECT 1 FROM pg_class'
956 . ' WHERE relname = \'' . $part_table . '\'';
957 $res = rg_sql_query($db, $sql);
958 if ($res === FALSE) {
954 $r = rg_sql_rel_exists($db, $part_table);
955 if ($r === FALSE) {
959 956 $ok = FALSE; $ok = FALSE;
960 957 break; break;
961 958 } }
962 $rows = rg_sql_num_rows($res);
963 rg_sql_free_result($res);
964 if ($rows > 0) {
959 if ($r === 1) {
965 960 rg_log('Table already exists.'); rg_log('Table already exists.');
966 961 continue; continue;
967 962 } }
 
... ... function rg_sql_struct_parts_update($db)
1010 1005 if ($ok !== TRUE) if ($ok !== TRUE)
1011 1006 break; break;
1012 1007
1013 $r = rg_state_set($db, 'parts_create_last_ts', $stop_ts);
1008 $r = rg_state_set($db, 'parts_create_last_ts', $good_ts);
1014 1009 if ($r !== TRUE) { if ($r !== TRUE) {
1015 1010 rg_log('Cannot set parts_create_last_ts (' . rg_state_error() . ')'); rg_log('Cannot set parts_create_last_ts (' . rg_state_error() . ')');
1016 1011 break; break;
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