Skip to content

Commit

Permalink
Added a daemon task to delete orphaned session records.
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasSchmitt authored and jepf committed Jun 17, 2024
1 parent 7f7185e commit 031c67d
Show file tree
Hide file tree
Showing 100 changed files with 314 additions and 50 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
- 2024-06-07 Fixed value used for owner lookup in AgentTicketProcess. Thanks to Falko Saller (@falkos). [#556](https://github.com/znuny/Znuny/pull/556)
- 2024-06-03 Fixed CSS problem with displaying articles in ticket details view.
- 2024-05-28 Fixed caching for queue updates.
- 2024-04-29 Added a daemon task to delete orphaned session records.
- 2024-04-24 Fixed regular expression in Kernel::System::HTMLUtils::LinkQuote which could lead to long execution times.

# 7.0.18 2024-05-29
Expand Down
18 changes: 18 additions & 0 deletions Kernel/Config/Files/XML/Znuny.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3416,4 +3416,22 @@
</Hash>
</Value>
</Setting>
<!-- Orphaned sessions -->
<Setting Name="Daemon::SchedulerCronTaskManager::Task###DeleteOrphanedSessions" Required="0" Valid="1">
<Description Translatable="1">Deletes orphaned sessions.</Description>
<Navigation>Daemon::SchedulerCronTaskManager::Task</Navigation>
<Value>
<Hash>
<Item Key="TaskName">DeleteOrphanedSessions</Item>
<Item Key="Schedule">58 * * * *</Item> <!-- default every hour in minute 58 -->
<Item Key="Module">Kernel::System::Console::Command::Maint::Session::DeleteOrphaned</Item>
<Item Key="Function">Execute</Item>
<Item Key="MaximumParallelInstances">1</Item>
<Item Key="Params">
<Array>
</Array>
</Item>
</Hash>
</Value>
</Setting>
</otrs_config>
3 changes: 2 additions & 1 deletion Kernel/Language/ar_SA.pm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ sub Data {
$Self->{DateFormatShort} = '%D.%M.%Y';
$Self->{DateInputFormat} = '%D.%M.%Y';
$Self->{DateInputFormatLong} = '%D.%M.%Y - %T';
$Self->{Completeness} = 0.0751569210439379;
$Self->{Completeness} = 0.0751445086705202;

# csv separator
$Self->{Separator} = '';
Expand Down Expand Up @@ -7859,6 +7859,7 @@ sub Data {
'Shows the title field in the NoteToLinkedTicket screen of the agent interface.' =>
'',
'Loader module registration for the public interface.' => '',
'Deletes orphaned sessions.' => '',

# XML Definition: scripts/database/initial_insert.xml
'invalid-temporarily' => 'غير فعال مؤقتاً',
Expand Down
3 changes: 2 additions & 1 deletion Kernel/Language/bg.pm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ sub Data {
$Self->{DateFormatShort} = '%D.%M.%Y';
$Self->{DateInputFormat} = '%D.%M.%Y - %T';
$Self->{DateInputFormatLong} = '%D.%M.%Y - %T';
$Self->{Completeness} = 0.197555335315494;
$Self->{Completeness} = 0.197522708505367;

# csv separator
$Self->{Separator} = ';';
Expand Down Expand Up @@ -7856,6 +7856,7 @@ sub Data {
'Shows the title field in the NoteToLinkedTicket screen of the agent interface.' =>
'',
'Loader module registration for the public interface.' => '',
'Deletes orphaned sessions.' => '',

# XML Definition: scripts/database/initial_insert.xml
'invalid-temporarily' => 'временно невалиден',
Expand Down
3 changes: 2 additions & 1 deletion Kernel/Language/ca.pm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ sub Data {
$Self->{DateFormatShort} = '%D.%M.%Y';
$Self->{DateInputFormat} = '%D.%M.%Y';
$Self->{DateInputFormatLong} = '%D.%M.%Y - %T';
$Self->{Completeness} = 0.206805417905517;
$Self->{Completeness} = 0.206771263418662;

# csv separator
$Self->{Separator} = '';
Expand Down Expand Up @@ -7856,6 +7856,7 @@ sub Data {
'Shows the title field in the NoteToLinkedTicket screen of the agent interface.' =>
'',
'Loader module registration for the public interface.' => '',
'Deletes orphaned sessions.' => '',

# XML Definition: scripts/database/initial_insert.xml
'invalid-temporarily' => 'invàlid-temporalment',
Expand Down
3 changes: 2 additions & 1 deletion Kernel/Language/cs.pm
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ sub Data {
$Self->{DateFormatShort} = '%D/%M/%Y';
$Self->{DateInputFormat} = '%D/%M/%Y';
$Self->{DateInputFormatLong} = '%D/%M/%Y - %T';
$Self->{Completeness} = 0.245292368681863;
$Self->{Completeness} = 0.245251857968621;

# csv separator
$Self->{Separator} = ';';
Expand Down Expand Up @@ -7862,6 +7862,7 @@ sub Data {
'Shows the title field in the NoteToLinkedTicket screen of the agent interface.' =>
'',
'Loader module registration for the public interface.' => '',
'Deletes orphaned sessions.' => '',

# XML Definition: scripts/database/initial_insert.xml
'invalid-temporarily' => 'neplatný-dočasně',
Expand Down
3 changes: 2 additions & 1 deletion Kernel/Language/da.pm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ sub Data {
$Self->{DateFormatShort} = '%D.%M.%Y';
$Self->{DateInputFormat} = '%D.%M.%Y';
$Self->{DateInputFormatLong} = '%D.%M.%Y - %T';
$Self->{Completeness} = 0.347043277172118;
$Self->{Completeness} = 0.346985962014864;

# csv separator
$Self->{Separator} = '';
Expand Down Expand Up @@ -7858,6 +7858,7 @@ sub Data {
'Shows the title field in the NoteToLinkedTicket screen of the agent interface.' =>
'',
'Loader module registration for the public interface.' => '',
'Deletes orphaned sessions.' => '',

# XML Definition: scripts/database/initial_insert.xml
'invalid-temporarily' => 'ugyldig-midlertidigt',
Expand Down
3 changes: 2 additions & 1 deletion Kernel/Language/de.pm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ sub Data {
$Self->{DateFormatShort} = '%D.%M.%Y';
$Self->{DateInputFormat} = '%D.%M.%Y';
$Self->{DateInputFormatLong} = '%D.%M.%Y - %T';
$Self->{Completeness} = 0.991575817641229;
$Self->{Completeness} = 0.991577208918249;

# csv separator
$Self->{Separator} = ';';
Expand Down Expand Up @@ -7856,6 +7856,7 @@ sub Data {
'Shows the title field in the NoteToLinkedTicket screen of the agent interface.' =>
'Zeigt den Ticket-Titel in der "Notiz übergeben"-Aktion im Agenten-Interface an.',
'Loader module registration for the public interface.' => 'Lade-Modulregistrierung für das öffentliche Interface.',
'Deletes orphaned sessions.' => 'Löscht verwaiste Sessions.',

# XML Definition: scripts/database/initial_insert.xml
'invalid-temporarily' => 'ungültig-temporär',
Expand Down
3 changes: 2 additions & 1 deletion Kernel/Language/el.pm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ sub Data {
$Self->{DateFormatShort} = '%D.%M.%Y';
$Self->{DateInputFormat} = '%D.%M.%Y';
$Self->{DateInputFormatLong} = '%D.%M.%Y - %T';
$Self->{Completeness} = 0.137760158572844;
$Self->{Completeness} = 0.137737407101569;

# csv separator
$Self->{Separator} = ';';
Expand Down Expand Up @@ -7861,6 +7861,7 @@ sub Data {
'Shows the title field in the NoteToLinkedTicket screen of the agent interface.' =>
'',
'Loader module registration for the public interface.' => '',
'Deletes orphaned sessions.' => '',

# XML Definition: scripts/database/initial_insert.xml
'invalid-temporarily' => 'Προσωρινά Ακυρο',
Expand Down
3 changes: 2 additions & 1 deletion Kernel/Language/en_CA.pm
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ sub Data {
$Self->{DateFormatShort} = '%Y-%M-%D';
$Self->{DateInputFormat} = '%Y-%M-%D';
$Self->{DateInputFormatLong} = '%Y-%M-%D - %T';
$Self->{Completeness} = 0.00264288074000661;
$Self->{Completeness} = 0.00264244426094137;

# csv separator
$Self->{Separator} = ',';
Expand Down Expand Up @@ -7861,6 +7861,7 @@ sub Data {
'Shows the title field in the NoteToLinkedTicket screen of the agent interface.' =>
'',
'Loader module registration for the public interface.' => '',
'Deletes orphaned sessions.' => '',

# XML Definition: scripts/database/initial_insert.xml
'invalid-temporarily' => '',
Expand Down
3 changes: 2 additions & 1 deletion Kernel/Language/en_GB.pm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ sub Data {
$Self->{DateFormatShort} = '%D/%M/%Y';
$Self->{DateInputFormat} = '%D/%M/%Y';
$Self->{DateInputFormatLong} = '%D/%M/%Y - %T';
$Self->{Completeness} = 0.606871489924017;
$Self->{Completeness} = 0.606771263418662;

# csv separator
$Self->{Separator} = ',';
Expand Down Expand Up @@ -7858,6 +7858,7 @@ sub Data {
'Shows the title field in the NoteToLinkedTicket screen of the agent interface.' =>
'',
'Loader module registration for the public interface.' => '',
'Deletes orphaned sessions.' => '',

# XML Definition: scripts/database/initial_insert.xml
'invalid-temporarily' => 'invalid-temporarily',
Expand Down
3 changes: 2 additions & 1 deletion Kernel/Language/es.pm
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ sub Data {
$Self->{DateFormatShort} = '%D/%M/%Y';
$Self->{DateInputFormat} = '%D/%M/%Y';
$Self->{DateInputFormatLong} = '%D/%M/%Y - %T';
$Self->{Completeness} = 0.597786587380244;
$Self->{Completeness} = 0.597687861271676;

# csv separator
$Self->{Separator} = ';';
Expand Down Expand Up @@ -7869,6 +7869,7 @@ El control del acceso adicional para demostrar o no demostrar éste enlace puede
'Shows the title field in the NoteToLinkedTicket screen of the agent interface.' =>
'',
'Loader module registration for the public interface.' => '',
'Deletes orphaned sessions.' => '',

# XML Definition: scripts/database/initial_insert.xml
'invalid-temporarily' => 'temporalmente-no-válido',
Expand Down
3 changes: 2 additions & 1 deletion Kernel/Language/es_CO.pm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ sub Data {
$Self->{DateFormatShort} = '%D/%M/%Y';
$Self->{DateInputFormat} = '%D/%M/%Y';
$Self->{DateInputFormatLong} = '%D/%M/%Y - %T';
$Self->{Completeness} = 0.326726131483317;
$Self->{Completeness} = 0.326672171758877;

# csv separator
$Self->{Separator} = ';';
Expand Down Expand Up @@ -7857,6 +7857,7 @@ sub Data {
'Shows the title field in the NoteToLinkedTicket screen of the agent interface.' =>
'',
'Loader module registration for the public interface.' => '',
'Deletes orphaned sessions.' => '',

# XML Definition: scripts/database/initial_insert.xml
'invalid-temporarily' => 'temporalmente-inválido',
Expand Down
3 changes: 2 additions & 1 deletion Kernel/Language/es_MX.pm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ sub Data {
$Self->{DateFormatShort} = '%D/%M/%Y';
$Self->{DateInputFormat} = '%D/%M/%Y';
$Self->{DateInputFormatLong} = '%D/%M/%Y - %T';
$Self->{Completeness} = 0.734060125536835;
$Self->{Completeness} = 0.733938893476466;

# csv separator
$Self->{Separator} = ';';
Expand Down Expand Up @@ -7856,6 +7856,7 @@ sub Data {
'Shows the title field in the NoteToLinkedTicket screen of the agent interface.' =>
'',
'Loader module registration for the public interface.' => '',
'Deletes orphaned sessions.' => '',

# XML Definition: scripts/database/initial_insert.xml
'invalid-temporarily' => 'temporalmente-inválido',
Expand Down
3 changes: 2 additions & 1 deletion Kernel/Language/et.pm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ sub Data {
$Self->{DateFormatShort} = '%D.%M.%Y';
$Self->{DateInputFormat} = '%D.%M.%Y';
$Self->{DateInputFormatLong} = '%D.%M.%Y - %T';
$Self->{Completeness} = 0.166336306574166;
$Self->{Completeness} = 0.166308835672998;

# csv separator
$Self->{Separator} = '';
Expand Down Expand Up @@ -7856,6 +7856,7 @@ sub Data {
'Shows the title field in the NoteToLinkedTicket screen of the agent interface.' =>
'',
'Loader module registration for the public interface.' => '',
'Deletes orphaned sessions.' => '',

# XML Definition: scripts/database/initial_insert.xml
'invalid-temporarily' => 'ajutiselt kehtetu',
Expand Down
3 changes: 2 additions & 1 deletion Kernel/Language/fa.pm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ sub Data {
$Self->{DateFormatShort} = '%D.%M.%Y';
$Self->{DateInputFormat} = '%D.%M.%Y';
$Self->{DateInputFormatLong} = '%D.%M.%Y - %T';
$Self->{Completeness} = 0.619425173439049;
$Self->{Completeness} = 0.619322873658134;

# csv separator
$Self->{Separator} = '';
Expand Down Expand Up @@ -7861,6 +7861,7 @@ sub Data {
'Shows the title field in the NoteToLinkedTicket screen of the agent interface.' =>
'',
'Loader module registration for the public interface.' => '',
'Deletes orphaned sessions.' => '',

# XML Definition: scripts/database/initial_insert.xml
'invalid-temporarily' => 'موقتا غیر معتبر',
Expand Down
3 changes: 2 additions & 1 deletion Kernel/Language/fi.pm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ sub Data {
$Self->{DateFormatShort} = '%D.%M.%Y';
$Self->{DateInputFormat} = '%D.%M.%Y';
$Self->{DateInputFormatLong} = '%D.%M.%Y - %T';
$Self->{Completeness} = 0.190287413280476;
$Self->{Completeness} = 0.190255986787779;

# csv separator
$Self->{Separator} = ';';
Expand Down Expand Up @@ -7858,6 +7858,7 @@ sub Data {
'Shows the title field in the NoteToLinkedTicket screen of the agent interface.' =>
'',
'Loader module registration for the public interface.' => '',
'Deletes orphaned sessions.' => '',

# XML Definition: scripts/database/initial_insert.xml
'invalid-temporarily' => 'Poistettu käytöstä välikaikaisesti',
Expand Down
3 changes: 2 additions & 1 deletion Kernel/Language/fr.pm
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ sub Data {
$Self->{DateFormatShort} = '%D.%M.%Y';
$Self->{DateInputFormat} = '%D.%M.%Y';
$Self->{DateInputFormatLong} = '%D.%M.%Y - %T';
$Self->{Completeness} = 0.384539147670961;
$Self->{Completeness} = 0.384475639966969;

# csv separator
$Self->{Separator} = ';';
Expand Down Expand Up @@ -7864,6 +7864,7 @@ sub Data {
'Shows the title field in the NoteToLinkedTicket screen of the agent interface.' =>
'',
'Loader module registration for the public interface.' => '',
'Deletes orphaned sessions.' => '',

# XML Definition: scripts/database/initial_insert.xml
'invalid-temporarily' => 'temporairement invalidé',
Expand Down
3 changes: 2 additions & 1 deletion Kernel/Language/fr_CA.pm
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ sub Data {
$Self->{DateFormatShort} = '%D.%M.%Y';
$Self->{DateInputFormat} = '%D.%M.%Y';
$Self->{DateInputFormatLong} = '%D.%M.%Y - %T';
$Self->{Completeness} = 0.329369012223323;
$Self->{Completeness} = 0.329314616019818;

# csv separator
$Self->{Separator} = ';';
Expand Down Expand Up @@ -7863,6 +7863,7 @@ sub Data {
'Shows the title field in the NoteToLinkedTicket screen of the agent interface.' =>
'',
'Loader module registration for the public interface.' => '',
'Deletes orphaned sessions.' => '',

# XML Definition: scripts/database/initial_insert.xml
'invalid-temporarily' => 'temporairement non valide',
Expand Down
3 changes: 2 additions & 1 deletion Kernel/Language/gl.pm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ sub Data {
$Self->{DateFormatShort} = '%D/%M/%Y';
$Self->{DateInputFormat} = '%D/%M/%Y';
$Self->{DateInputFormatLong} = '%D/%M/%Y - %T';
$Self->{Completeness} = 0.464816650148662;
$Self->{Completeness} = 0.464739884393064;

# csv separator
$Self->{Separator} = ';';
Expand Down Expand Up @@ -7856,6 +7856,7 @@ sub Data {
'Shows the title field in the NoteToLinkedTicket screen of the agent interface.' =>
'',
'Loader module registration for the public interface.' => '',
'Deletes orphaned sessions.' => '',

# XML Definition: scripts/database/initial_insert.xml
'invalid-temporarily' => 'Non valido temporalmente',
Expand Down
3 changes: 2 additions & 1 deletion Kernel/Language/he.pm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ sub Data {
$Self->{DateFormatShort} = '%D/%M/%Y';
$Self->{DateInputFormat} = '%D/%M/%Y';
$Self->{DateInputFormatLong} = '%D/%M/%Y - %T';
$Self->{Completeness} = 0.22398414271556;
$Self->{Completeness} = 0.223947151114781;

# csv separator
$Self->{Separator} = '';
Expand Down Expand Up @@ -7862,6 +7862,7 @@ sub Data {
'Shows the title field in the NoteToLinkedTicket screen of the agent interface.' =>
'',
'Loader module registration for the public interface.' => '',
'Deletes orphaned sessions.' => '',

# XML Definition: scripts/database/initial_insert.xml
'invalid-temporarily' => 'לא תקף זמנית',
Expand Down
3 changes: 2 additions & 1 deletion Kernel/Language/hi.pm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ sub Data {
$Self->{DateFormatShort} = '%D/%M/%Y';
$Self->{DateInputFormat} = '%D/%M/%Y';
$Self->{DateInputFormatLong} = '%D/%M/%Y - %T';
$Self->{Completeness} = 0.258341592335646;
$Self->{Completeness} = 0.258298926507019;

# csv separator
$Self->{Separator} = ';';
Expand Down Expand Up @@ -7858,6 +7858,7 @@ sub Data {
'Shows the title field in the NoteToLinkedTicket screen of the agent interface.' =>
'',
'Loader module registration for the public interface.' => '',
'Deletes orphaned sessions.' => '',

# XML Definition: scripts/database/initial_insert.xml
'invalid-temporarily' => 'अवैध-अस्थायी रूप',
Expand Down
3 changes: 2 additions & 1 deletion Kernel/Language/hr.pm
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ sub Data {
$Self->{DateFormatShort} = '%D.%M.%Y';
$Self->{DateInputFormat} = '%D.%M.%Y';
$Self->{DateInputFormatLong} = '%D.%M.%Y - %T';
$Self->{Completeness} = 0.219028741328048;
$Self->{Completeness} = 0.218992568125516;

# csv separator
$Self->{Separator} = ';';
Expand Down Expand Up @@ -7859,6 +7859,7 @@ sub Data {
'Shows the title field in the NoteToLinkedTicket screen of the agent interface.' =>
'',
'Loader module registration for the public interface.' => '',
'Deletes orphaned sessions.' => '',

# XML Definition: scripts/database/initial_insert.xml
'invalid-temporarily' => 'neispravno-privremeno',
Expand Down
Loading

0 comments on commit 031c67d

Please sign in to comment.