Skip to content

Commit

Permalink
[LINET] regelmäßig Basiswerte in employee aus auth.user aktualisieren
Browse files Browse the repository at this point in the history
Wenn Authentifizierung via HTTP-Headern aktiv ist, wird die normale
Login-Routine umgangen, in der dieses Update ansonsten gemacht
wird. Also automatisch alle fünf Minuten machen.
  • Loading branch information
mbunkus committed Dec 16, 2024
1 parent 7c5c23f commit 82648ac
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
19 changes: 19 additions & 0 deletions SL/BackgroundJob/LSUpdateEmployeeBaseData.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package SL::BackgroundJob::LSUpdateEmployeeBaseData;

use strict;
use utf8;

use parent qw(SL::BackgroundJob::Base);

use SL::DB::BackgroundJob;
use SL::DB::Employee;

sub run {
my ($self, $db_obj, $end_date) = @_;

SL::DB::Manager::Employee->update_entries_for_authorized_users;

return 1;
}

1;
5 changes: 5 additions & 0 deletions sql/Pg-upgrade2/linet_update_employee_base_data.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-- @tag: linet_update_employee_base_data
-- @description: LINET: Hintergrundjob für regelmäßiges Aktualisieren der Employee-Basisdaten aus der Auth-Tabelle
-- @depends: release_3_5_6
INSERT INTO background_jobs (type, package_name, active, cron_spec, next_run_at)
VALUES ('interval', 'LSUpdateEmployeeBaseData', true, '*/5 * * * *', current_timestamp);

0 comments on commit 82648ac

Please sign in to comment.