Skip to content

Commit

Permalink
Action scheduler refactored (#1471)
Browse files Browse the repository at this point in the history
* 1. action scheduler refactored
2. library updated

* library updated

* library updated

* 1. sso default signature fixed
2. schedule action id fixed

* 1. sso default signature fixed
2. schedule action id fixed
  • Loading branch information
sfahad1414 authored Aug 30, 2024
1 parent 2a0593e commit cbcb04d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion kairon/actions/definitions/schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ async def add_schedule_job(self,
'func': func,
'args': tuple(args) if args is not None else (),
'kwargs': dict(kwargs) if kwargs is not None else {},
'_id': _id,
'id': _id,
'name': "execute_task",
'misfire_grace_time': 7200,
'coalesce': True,
Expand Down
13 changes: 10 additions & 3 deletions kairon/shared/sso/clients/kairon.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ujson as json
from typing import Optional, Dict, Any
from typing import Optional, Dict, Any, Union, Literal
from loguru import logger as logging
import httpx
from fastapi_sso.sso.base import SSOBase, OpenID
Expand All @@ -9,8 +9,15 @@
class KaironSSO(SSOBase):

async def process_login(
self, code: str, request: Request, *, params: Optional[Dict[str, Any]] = None,
additional_headers: Optional[Dict[str, Any]] = None, redirect_uri: Optional[str] = None
self,
code: str,
request: Request,
*,
params: Optional[Dict[str, Any]] = None,
additional_headers: Optional[Dict[str, Any]] = None,
redirect_uri: Optional[str] = None,
pkce_code_verifier: Optional[str] = None,
convert_response: Union[Literal[True], Literal[False]] = True,
) -> Optional[OpenID]:
"""This method should be called from callback endpoint to verify the user and request user info endpoint.
This is low level, you should use {verify_and_process} instead.
Expand Down
3 changes: 2 additions & 1 deletion kairon/shared/sso/clients/linkedin.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ async def get_discovery_document(cls) -> Dict[str, str]:
}

async def process_login(
self, code: str,
self,
code: str,
request: Request,
*,
params: Optional[Dict[str, Any]] = None,
Expand Down

0 comments on commit cbcb04d

Please sign in to comment.