Commit 5818beb
committed
Add
* Add `fetch_key_val` function to handle Redis connection, key retrieval, and error handling
* Update `fetch_key_val` to handle `--output` flag and save value to file if specified
* Update `fetch_key_val` to exit with code 1 and print error message if key is not found
* Update `fetch_key_val` to exit with code 2 and print error message if Redis is unreachablefetch_key_val function to fetch value from Redis and handle errors gracefully1 parent 5d47cf3 commit 5818beb
1 file changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
| |||
92 | 91 | | |
93 | 92 | | |
94 | 93 | | |
95 | | - | |
| 94 | + | |
96 | 95 | | |
97 | 96 | | |
98 | 97 | | |
| |||
0 commit comments