Skip to content

Commit ce87597

Browse files
authored
Merge pull request #1961 from OCA/14.0
Syncing from upstream OCA/server-tools (14.0)
2 parents 9fabb04 + 2a6451e commit ce87597

File tree

5 files changed

+35
-22
lines changed

5 files changed

+35
-22
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ addon | version | maintainers | summary
3333
[base_contextvars](base_contextvars/) | 14.0.1.0.4 | <a href='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/sbidoul'><img src='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/sbidoul.png' width='32' height='32' style='border-radius:50%;' alt='sbidoul'/></a> | Patch Odoo threadlocals to use contextvars instead.
3434
[base_cron_exclusion](base_cron_exclusion/) | 14.0.1.0.0 | <a href='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/LoisRForgeFlow'><img src='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/LoisRForgeFlow.png' width='32' height='32' style='border-radius:50%;' alt='LoisRForgeFlow'/></a> | Allow you to select scheduled actions that should not run simultaneously.
3535
[base_custom_info](base_custom_info/) | 14.0.1.0.3 | | Add custom field in models
36-
[base_deterministic_session_gc](base_deterministic_session_gc/) | 14.0.1.0.0 | | Provide a deterministic session garbage collection instead of the default random one
36+
[base_deterministic_session_gc](base_deterministic_session_gc/) | 14.0.1.0.1 | | Provide a deterministic session garbage collection instead of the default random one
3737
[base_exception](base_exception/) | 14.0.3.0.0 | <a href='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/hparfr'><img src='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/hparfr.png' width='32' height='32' style='border-radius:50%;' alt='hparfr'/></a> <a href='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/sebastienbeau'><img src='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/sebastienbeau.png' width='32' height='32' style='border-radius:50%;' alt='sebastienbeau'/></a> | This module provide an abstract model to manage customizable exceptions to be applied on different models (sale order, invoice, ...)
3838
[base_fontawesome](base_fontawesome/) | 14.0.5.15.5 | | Up to date Fontawesome resources.
3939
[base_force_record_noupdate](base_force_record_noupdate/) | 14.0.1.0.0 | | Manually force noupdate=True on models

base_deterministic_session_gc/README.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
.. image:: https://odoo-community.org/readme-banner-image
2+
:target: https://odoo-community.org/get-involved?utm_source=readme
3+
:alt: Odoo Community Association
4+
15
========================
26
Deterministic Session GC
37
========================
@@ -7,13 +11,13 @@ Deterministic Session GC
711
!! This file is generated by oca-gen-addon-readme !!
812
!! changes will be overwritten. !!
913
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10-
!! source digest: sha256:497a5b82f841b2039930ac730527a902f7193189b59e3eeac3d2e795df97f296
14+
!! source digest: sha256:259a927963fd52a8c7a49d8b6ea7ebf13c9de4864d041dfecb8d6bab301fb5ef
1115
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1216
1317
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
1418
:target: https://odoo-community.org/page/development-status
1519
:alt: Beta
16-
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
20+
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
1721
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1822
:alt: License: AGPL-3
1923
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github

base_deterministic_session_gc/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"name": "Deterministic Session GC",
66
"summary": "Provide a deterministic session garbage collection"
77
" instead of the default random one",
8-
"version": "14.0.1.0.0",
8+
"version": "14.0.1.0.1",
99
"author": "Trobz,Odoo Community Association (OCA)",
1010
"website": "https://github.com/OCA/server-tools",
1111
"category": "Extra Tools",

base_deterministic_session_gc/http.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Copyright 2019 Trobz <https://trobz.com>
22
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
33

4+
import glob
45
import logging
56
import os
67
import time
@@ -27,7 +28,7 @@ def deterministic_session_gc(session_store, session_expiry_delay=None):
2728
"Deleting all sessions inactive since %s",
2829
datetime.fromtimestamp(expired_time).strftime(DEFAULT_SERVER_DATETIME_FORMAT),
2930
)
30-
for fname in os.listdir(session_store.path):
31+
for fname in glob.iglob(os.path.join(session_store.path, "*")):
3132
path = os.path.join(session_store.path, fname)
3233
try:
3334
if os.path.getmtime(path) < expired_time:

base_deterministic_session_gc/static/description/index.html

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
<?xml version="1.0" encoding="utf-8"?>
21
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
32
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
43
<head>
54
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
65
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
7-
<title>Deterministic Session GC</title>
6+
<title>README.rst</title>
87
<style type="text/css">
98

109
/*
1110
:Author: David Goodger ([email protected])
12-
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
11+
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
1312
:Copyright: This stylesheet has been placed in the public domain.
1413
1514
Default cascading style sheet for the HTML output of Docutils.
15+
Despite the name, some widely supported CSS2 features are used.
1616
1717
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
1818
customize this style sheet.
@@ -275,7 +275,7 @@
275275
margin-left: 2em ;
276276
margin-right: 2em }
277277

278-
pre.code .ln { color: grey; } /* line numbers */
278+
pre.code .ln { color: gray; } /* line numbers */
279279
pre.code, code { background-color: #eeeeee }
280280
pre.code .comment, code .comment { color: #5C6576 }
281281
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
@@ -301,7 +301,7 @@
301301
span.pre {
302302
white-space: pre }
303303

304-
span.problematic {
304+
span.problematic, pre.problematic {
305305
color: red }
306306

307307
span.section-subtitle {
@@ -360,16 +360,21 @@
360360
</style>
361361
</head>
362362
<body>
363-
<div class="document" id="deterministic-session-gc">
364-
<h1 class="title">Deterministic Session GC</h1>
363+
<div class="document">
365364

365+
366+
<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
367+
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
368+
</a>
369+
<div class="section" id="deterministic-session-gc">
370+
<h1>Deterministic Session GC</h1>
366371
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
367372
!! This file is generated by oca-gen-addon-readme !!
368373
!! changes will be overwritten. !!
369374
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370-
!! source digest: sha256:497a5b82f841b2039930ac730527a902f7193189b59e3eeac3d2e795df97f296
375+
!! source digest: sha256:259a927963fd52a8c7a49d8b6ea7ebf13c9de4864d041dfecb8d6bab301fb5ef
371376
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
372-
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-tools/tree/14.0/base_deterministic_session_gc"><img alt="OCA/server-tools" src="https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-tools-14-0/server-tools-14-0-base_deterministic_session_gc"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/server-tools&amp;target_branch=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
377+
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-tools/tree/14.0/base_deterministic_session_gc"><img alt="OCA/server-tools" src="https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-tools-14-0/server-tools-14-0-base_deterministic_session_gc"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/server-tools&amp;target_branch=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373378
<p>Whenever a new request is processed by Odoo, this statement is evaluated:
374379
<cite>random.random() &lt; 0.001</cite> [<a class="reference external" href="https://github.com/odoo/odoo/blob/a0a11fd5e2d78e5fc0d1503275adade570fe0d42/odoo/http.py#L1192">1</a>]</p>
375380
<p>1 time out of 1000 in average, it will return <cite>True</cite> and trigger the
@@ -411,7 +416,7 @@ <h1 class="title">Deterministic Session GC</h1>
411416
</ul>
412417
</div>
413418
<div class="section" id="installation">
414-
<h1><a class="toc-backref" href="#toc-entry-1">Installation</a></h1>
419+
<h2><a class="toc-backref" href="#toc-entry-1">Installation</a></h2>
415420
<p>You need to load this module server-wide:</p>
416421
<ul class="simple">
417422
<li>By starting Odoo with <tt class="docutils literal"><span class="pre">--load=web,base_deterministic_session_gc</span></tt></li>
@@ -426,7 +431,7 @@ <h1><a class="toc-backref" href="#toc-entry-1">Installation</a></h1>
426431
if you want to use the provided deterministic approach.</p>
427432
</div>
428433
<div class="section" id="configuration">
429-
<h1><a class="toc-backref" href="#toc-entry-2">Configuration</a></h1>
434+
<h2><a class="toc-backref" href="#toc-entry-2">Configuration</a></h2>
430435
<p>You can change the session expiry delay in the Odoo configuration file:</p>
431436
<pre class="code ini literal-block">
432437
<span class="k">[options]</span><span class="w">
@@ -437,31 +442,33 @@ <h1><a class="toc-backref" href="#toc-entry-2">Configuration</a></h1>
437442
<p>Default value is 7 days.</p>
438443
</div>
439444
<div class="section" id="bug-tracker">
440-
<h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
445+
<h2><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h2>
441446
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/server-tools/issues">GitHub Issues</a>.
442447
In case of trouble, please check there if your issue has already been reported.
443448
If you spotted it first, help us to smash it by providing a detailed and welcomed
444449
<a class="reference external" href="https://github.com/OCA/server-tools/issues/new?body=module:%20base_deterministic_session_gc%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
445450
<p>Do not contact contributors directly about support or help with technical issues.</p>
446451
</div>
447452
<div class="section" id="credits">
448-
<h1><a class="toc-backref" href="#toc-entry-4">Credits</a></h1>
453+
<h2><a class="toc-backref" href="#toc-entry-4">Credits</a></h2>
449454
<div class="section" id="authors">
450-
<h2><a class="toc-backref" href="#toc-entry-5">Authors</a></h2>
455+
<h3><a class="toc-backref" href="#toc-entry-5">Authors</a></h3>
451456
<ul class="simple">
452457
<li>Trobz</li>
453458
</ul>
454459
</div>
455460
<div class="section" id="contributors">
456-
<h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
461+
<h3><a class="toc-backref" href="#toc-entry-6">Contributors</a></h3>
457462
<ul class="simple">
458463
<li>Nils Hamerlinck &lt;<a class="reference external" href="mailto:nils&#64;trobz.com">nils&#64;trobz.com</a>&gt;</li>
459464
</ul>
460465
</div>
461466
<div class="section" id="maintainers">
462-
<h2><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h2>
467+
<h3><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h3>
463468
<p>This module is maintained by the OCA.</p>
464-
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
469+
<a class="reference external image-reference" href="https://odoo-community.org">
470+
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
471+
</a>
465472
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
466473
mission is to support the collaborative development of Odoo features and
467474
promote its widespread use.</p>
@@ -470,5 +477,6 @@ <h2><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h2>
470477
</div>
471478
</div>
472479
</div>
480+
</div>
473481
</body>
474482
</html>

0 commit comments

Comments
 (0)