-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(deploy): test deployment to kubernetes azure
- Loading branch information
1 parent
2f7d5da
commit a391c1c
Showing
5 changed files
with
54 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import redis | ||
|
||
class Redis: | ||
def __init__(self, host, port): | ||
self.host = host | ||
self.port = port | ||
self.client = redis.Redis(host=host, port=port, retry_on_timeout=True, decode_responses=True) | ||
|
||
def set_key(self, key:str, data:any): | ||
self.client.set(key, data) | ||
self.client.expire(key, 60*10) | ||
|
||
|
||
def get_key(self, key:str) -> any: | ||
return self.client.get(key) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
|
||
services: | ||
redis: | ||
image: redis:6.0.9 | ||
restart: "no" | ||
ports: | ||
- "6379:6379" | ||
api: | ||
build: | ||
context: ./api | ||
|