-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
539 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
================= | ||
Database Age Cron | ||
================= | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:13ab0febe972f77eb9af2cdb678d69c6648e34f3a8519c45acb04a816b4eb549 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png | ||
:target: https://odoo-community.org/page/development-status | ||
:alt: Beta | ||
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
.. |badge3| image:: https://img.shields.io/badge/github-akretion%2Fak--odoo--incubator-lightgray.png?logo=github | ||
:target: https://github.com/akretion/ak-odoo-incubator/tree/16.0/database_age_cron | ||
:alt: akretion/ak-odoo-incubator | ||
|
||
|badge1| |badge2| |badge3| | ||
|
||
This module adds a simple cron that allows to know easily what is the age of the database | ||
|
||
You just have to check the `lastcall` date of the cron (via Odoo or via SQL) | ||
to know when it ran for the last time. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Usage | ||
===== | ||
|
||
To make it work, you will need to deactivate the cron once the database is not in production anymore. | ||
|
||
For instance with a script that runs: | ||
|
||
.. code:: sql | ||
UPDATE ir_cron SET active='f' WHERE cron_name = 'Database Age Cron'; | ||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/akretion/ak-odoo-incubator/issues>`_. | ||
In case of trouble, please check there if your issue has already been reported. | ||
If you spotted it first, help us to smash it by providing a detailed and welcomed | ||
`feedback <https://github.com/akretion/ak-odoo-incubator/issues/new?body=module:%20database_age_cron%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
|
||
Do not contact contributors directly about support or help with technical issues. | ||
|
||
Credits | ||
======= | ||
|
||
Authors | ||
~~~~~~~ | ||
|
||
* Akretion | ||
|
||
Maintainers | ||
~~~~~~~~~~~ | ||
|
||
This module is part of the `akretion/ak-odoo-incubator <https://github.com/akretion/ak-odoo-incubator/tree/16.0/database_age_cron>`_ project on GitHub. | ||
|
||
You are welcome to contribute. |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "Database Age Cron", | ||
"summary": "Run a cron that determines database age", | ||
"version": "16.0.1.0.0", | ||
"category": "Uncategorized", | ||
"website": "https://github.com/akretion/ak-odoo-incubator", | ||
"author": " Akretion", | ||
"license": "AGPL-3", | ||
"application": False, | ||
"installable": True, | ||
"depends": [ | ||
"base", | ||
], | ||
"data": [ | ||
"data/cron.xml", | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<odoo> | ||
|
||
<record id="database_age" model="ir.cron"> | ||
<field name="name">Database Age Cron</field> | ||
<field name="interval_number">1</field> | ||
<field name="interval_type">minutes</field> | ||
<field name="numbercall">-1</field> | ||
<field name="priority">10</field> | ||
<field name="active">True</field> | ||
<field name="state">code</field> | ||
<field name="model_id" ref="base.model_base" /> | ||
<field name="code">pass</field> | ||
</record> | ||
|
||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
This module adds a simple cron that allows to know easily what is the age of the database | ||
|
||
You just have to check the `lastcall` date of the cron (via Odoo or via SQL) | ||
to know when it ran for the last time. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
To make it work, you will need to deactivate the cron once the database is not in production anymore. | ||
|
||
For instance with a script that runs: | ||
|
||
.. code:: sql | ||
UPDATE ir_cron SET active='f' WHERE cron_name = 'Database Age Cron'; |
Oops, something went wrong.