Skip to content

Commit d66a62c

Browse files
committed
fix: bump flask version
1 parent 87c844e commit d66a62c

File tree

4 files changed

+21
-7
lines changed

4 files changed

+21
-7
lines changed

.github/workflows/servc.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: 'Serv-C Unit Test'
22
on:
3-
- pull_request
3+
pull_request:
4+
push:
5+
branches:
6+
- main
47

58
jobs:
69
servc:

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ Serv-C implmentation for Python. Documentation can be found https://docs.servc.i
1010
Here is the most simple example of use, starting a server to handle requests at the route `my-route`;
1111

1212
```python
13-
from servc.com.server.server import start_server
13+
from servc.server import start_server
1414

15-
def inputProcessor(messageId, bus, cache, components, message, emit):
15+
def inputProcessor(messageId, bus, cache, payload, components):
1616
pass
1717

1818
# the method 'methodA' will be resolved by inputProcessor
1919
start_server(
20-
{
20+
resolver={
2121
"methodA": inputProcessor
2222
}
2323
)

main.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,23 @@
11
from servc.server import start_server
22

33

4+
def test_resolver(id, bus, cache, payload, _c):
5+
if not isinstance(payload, list):
6+
return False
7+
for x in payload:
8+
if not isinstance(x, str):
9+
return False
10+
return True
11+
12+
413
def main():
514
return start_server(
6-
resolver={},
15+
resolver={
16+
"test": test_resolver,
17+
},
718
# route="test",
819
)
920

1021

11-
if __name__ == '__main__':
22+
if __name__ == "__main__":
1223
main()

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
pika==1.3.2
33
redis==5.2.0
44
simplejson==3.19.2
5-
flask==3.0.1
5+
flask==3.1.0
66
pyyaml==6.0.2

0 commit comments

Comments
 (0)