@ -65,9 +65,12 @@ class AuthentikOutpostConfig(ManagedAppConfig):
|
|||||||
|
|
||||||
@ManagedAppConfig.reconcile_global
|
@ManagedAppConfig.reconcile_global
|
||||||
def outpost_connection_discovery(self):
|
def outpost_connection_discovery(self):
|
||||||
from authentik.outposts.tasks import outpost_connection_discovery
|
from authentik.tasks.schedules.models import Schedule
|
||||||
|
|
||||||
outpost_connection_discovery.send()
|
for schedule in Schedule.objects.filter(
|
||||||
|
actor_name__in=("authentik.outposts.tasks.outpost_connection_discovery",),
|
||||||
|
):
|
||||||
|
schedule.send()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def tenant_schedule_specs(self) -> list[ScheduleSpec]:
|
def tenant_schedule_specs(self) -> list[ScheduleSpec]:
|
||||||
|
|||||||
@ -163,7 +163,8 @@ def outpost_post_save(model_class: str, model_pk: Any):
|
|||||||
|
|
||||||
if isinstance(instance, Outpost):
|
if isinstance(instance, Outpost):
|
||||||
LOGGER.debug("Trigger reconcile for outpost", instance=instance)
|
LOGGER.debug("Trigger reconcile for outpost", instance=instance)
|
||||||
outpost_controller.send(instance.pk)
|
for schedule in instance.schedules.all():
|
||||||
|
schedule.send()
|
||||||
|
|
||||||
if isinstance(instance, OutpostModel | Outpost):
|
if isinstance(instance, OutpostModel | Outpost):
|
||||||
LOGGER.debug("triggering outpost update from outpostmodel/outpost", instance=instance)
|
LOGGER.debug("triggering outpost update from outpostmodel/outpost", instance=instance)
|
||||||
@ -171,7 +172,8 @@ def outpost_post_save(model_class: str, model_pk: Any):
|
|||||||
|
|
||||||
if isinstance(instance, OutpostServiceConnection):
|
if isinstance(instance, OutpostServiceConnection):
|
||||||
LOGGER.debug("triggering ServiceConnection state update", instance=instance)
|
LOGGER.debug("triggering ServiceConnection state update", instance=instance)
|
||||||
outpost_service_connection_monitor.send(instance.pk)
|
for schedule in instance.schedules.all():
|
||||||
|
schedule.send()
|
||||||
|
|
||||||
for field in instance._meta.get_fields():
|
for field in instance._meta.get_fields():
|
||||||
# Each field is checked if it has a `related_model` attribute (when ForeginKeys or M2Ms)
|
# Each field is checked if it has a `related_model` attribute (when ForeginKeys or M2Ms)
|
||||||
|
|||||||
@ -5,5 +5,5 @@ from dramatiq import actor
|
|||||||
def test_actor():
|
def test_actor():
|
||||||
import time
|
import time
|
||||||
|
|
||||||
time.sleep(5)
|
time.sleep(2)
|
||||||
print("done sleeping")
|
print("done sleeping")
|
||||||
|
|||||||
@ -43,9 +43,9 @@ export class ScheduleList extends Table<Schedule> {
|
|||||||
|
|
||||||
columns(): TableColumn[] {
|
columns(): TableColumn[] {
|
||||||
return [
|
return [
|
||||||
new TableColumn(msg("Schedule")),
|
new TableColumn(msg("Schedule"), "actor_name"),
|
||||||
new TableColumn(msg("Crontab")),
|
new TableColumn(msg("Crontab"), "crontab"),
|
||||||
new TableColumn(msg("Next run")),
|
new TableColumn(msg("Next run"), "next_run"),
|
||||||
new TableColumn(msg("Actions")),
|
new TableColumn(msg("Actions")),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user