コード例 #1
0
ファイル: requests.py プロジェクト: ywyt738/consoleme
 def on_finish(self) -> None:
     if self.request.method != "POST":
         return
     celery_app.send_task(
         "consoleme.celery_tasks.celery_tasks.cache_policy_requests")
     celery_app.send_task(
         "consoleme.celery_tasks.celery_tasks.cache_credential_authorization_mapping"
     )
コード例 #2
0
 def on_finish(self) -> None:
     if self.request.method != "POST":
         return
     # Force a refresh of credential authorization mapping in current region
     # TODO: Trigger this to run cross-region
     # TODO: Delete server-side user-role cache intelligently so users get immediate access
     celery_app.send_task(
         "consoleme.celery_tasks.celery_tasks.cache_credential_authorization_mapping",
         countdown=config.get("dynamic_config.dynamo_load_interval"),
     )
コード例 #3
0
ファイル: roles.py プロジェクト: castrapel/consoleme
 def on_finish(self) -> None:
     if self.request.method != "POST":
         return
     # Force refresh of crednetial authorization mapping after the dynamic config sync period to ensure all workers
     # have the updated configuration
     celery_app.send_task(
         "consoleme.celery_tasks.celery_tasks.cache_policies_table_details",
     )
     celery_app.send_task(
         "consoleme.celery_tasks.celery_tasks.cache_credential_authorization_mapping",
     )