-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathToDo
20 lines (19 loc) · 1.17 KB
/
ToDo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
- errorChan buffer of 100 can overflow. Need rethinking
- Use .env for grpc host:port
- Understand when unbuffered vs buffered channels block + for c := range channel { } syntactic sugar.
What happens if I send two values to an unbuffered channel?
- Graceful shutdown: In a production system, you'd want to implement a graceful shutdown mechanism
to ensure no tasks are lost when the program exits.
- Backpressure: If tasks arrive faster than they can be processed, the channel might fill up.
You'll need to decide how to handle this (e.g., blocking, dropping tasks, or implementing a more sophisticated queuing system).
- Scalability: For high-volume systems, you might consider using multiple worker goroutines to process tasks in parallel.
- task_generator: Save and Send tasks might compete for the same errochannel
- Review errors, determine when to panic
- Use TaskStateFailed
- Update task state not only in db but also in memory (i.e. *sqlc.Task)
- Correct syntax for channel function parameters that are receive-only channels to taskChan <-chan sqlc.Task
- Close grpc channel when done
Done:
- Extract shared microservice code
- Rename, refactor
- automatically initialize database