Compare commits
2 Commits
26cd716590
...
e797f8929d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e797f8929d | ||
|
|
d46e8685d7 |
23
k8s/base/drone-rbac.yaml
Normal file
23
k8s/base/drone-rbac.yaml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: drone-deploy
|
||||||
|
namespace: invest-api
|
||||||
|
rules:
|
||||||
|
- apiGroups: ["apps"]
|
||||||
|
resources: ["deployments"]
|
||||||
|
verbs: ["get", "patch"]
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: drone-deploy
|
||||||
|
namespace: invest-api
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: default
|
||||||
|
namespace: drone
|
||||||
|
roleRef:
|
||||||
|
kind: Role
|
||||||
|
name: drone-deploy
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
@@ -9,4 +9,5 @@ resources:
|
|||||||
- deployment.yaml
|
- deployment.yaml
|
||||||
- service.yaml
|
- service.yaml
|
||||||
- ingress.yaml
|
- ingress.yaml
|
||||||
|
- drone-rbac.yaml
|
||||||
|
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ async def get_financials(symbol: str) -> dict:
|
|||||||
async def get_price_target(symbol: str) -> float | None:
|
async def get_price_target(symbol: str) -> float | None:
|
||||||
try:
|
try:
|
||||||
result = await asyncio.to_thread(
|
result = await asyncio.to_thread(
|
||||||
obb.equity.estimates.price_target, symbol, provider=PROVIDER
|
obb.equity.estimates.price_target, symbol, provider="fmp"
|
||||||
)
|
)
|
||||||
items = _to_dicts(result)
|
items = _to_dicts(result)
|
||||||
if items:
|
if items:
|
||||||
|
|||||||
Reference in New Issue
Block a user