Commit Graph
29 Commits
Author SHA1 Message Date
w1ndyb0y 419f25f0dd fix: comprehensive bug fixes and architecture restructuring
Phase 1 — Bug fixes (7 bugs):
- Bug 1: Pulsar mode data loss — always persist to SQLite regardless of mode
- Bug 2: PulsarSend closing TCP client — use independent resetPulsarProducer()
- Bug 3: Greedy regex — use non-greedy (?s)ZCZC.*?NNNN
- Bug 4: Data after NNNN discarded — keep remaining buffer data
- Bug 5: strings.Index > 0 boundary — use strings.Contains
- Bug 6: Variable shadowing in PulsarSend — use = not :=
- Bug 7: Accept failure nil panic — add continue + retry logic

Phase 2 — Architecture restructuring:
- Split utils/ into config/, serial/, telegram/, storage/, transport/
- Define Sender, Repository, Reader interfaces
- Introduce app/ layer with context.Context lifecycle
- Replace spinlock with sync.Mutex
- Unified Config struct replaces 15+ global vars

Phase 3 — Testing & tooling:
- telegram/parser_test.go (7 test cases)
- storage/store_test.go (5 test cases)
- transport/transport_test.go (4 test cases)
- Taskfile: add test, test-race, test-cover tasks
- Go version: 1.15 -> 1.21
2026-07-10 15:32:34 +08:00
w1ndyb0y 133c80088c check tcp when insert telegram to db 2021-02-01 17:29:01 +08:00
w1ndyb0y fe1a8169e6 move pulsar send to telegram.go 2021-02-01 17:13:54 +08:00
w1ndyb0y b9a826faf8 pulsar write 2021-02-01 17:03:24 +08:00
zhiqiang feng 35c1966e87 modify log 2020-12-28 17:16:38 +08:00
zhiqiang feng 2cfac56ec5 sleep 0.5 sec every telegram 2020-12-28 16:09:08 +08:00
zhiqiang feng 0619229ec5 add zap logger 2020-12-28 15:58:00 +08:00
fengzhiqiang c06ec0a519 fix digital log 2020-12-28 14:14:13 +08:00
zhiqiang feng 4c336bbb96 log digital 2020-12-28 13:05:42 +08:00
zhiqiang feng 04f6c42113 change template 2020-12-28 13:01:59 +08:00
fengzhiqiang 2d8f5c7907 modify logger 2020-12-28 13:00:16 +08:00
zhiqiang feng eaf32cf1e7 write lock change to debug 2020-12-28 11:30:16 +08:00
zhiqiang feng 2cbfbdbbca add zap for default logger 2020-12-28 11:06:36 +08:00
w1ndyb0y 8763ae6c08 update result 2020-12-23 14:31:25 +08:00
w1ndyb0y bac084b1d0 add client ready flag 2020-12-23 14:30:09 +08:00
w1ndyb0y 7a21e09048 rewrite load 2020-12-23 14:23:55 +08:00
w1ndyb0y 33eab0a6c6 check statement error 2020-12-23 14:12:00 +08:00
w1ndyb0y 18ff12f424 add transaction in write 2020-12-23 14:04:06 +08:00
fengzhiqiang bc3f765baf update process 2020-12-23 14:02:16 +08:00
w1ndyb0y 216e92f983 add lock log 2020-12-23 13:49:46 +08:00
w1ndyb0y 514e01b31c Merge branch 'develop' of gitee.com:w1ndyb0y/tele-recv into develop 2020-12-23 13:45:23 +08:00
w1ndyb0y 97a7cf1d07 get db remove init log 2020-12-23 13:45:00 +08:00
fengzhiqiang 5ef6955d48 update telegram 2020-12-23 13:41:46 +08:00
w1ndyb0y 0df588f587 add load unprocessed 2020-12-23 13:07:45 +08:00
fengzhiqiang 18e923ef82 change default wait time 2020-12-23 11:10:06 +08:00
zhiqiang feng a44a58296e if client connected, send data, mark processed 1 2020-12-22 12:09:33 +08:00
zhiqiang feng 13ff3f09e8 fix run, add connection check 2020-12-22 11:45:25 +08:00
w1ndyb0y f67d00d6b8 add insert new telegram 2020-12-21 17:58:55 +08:00
w1ndyb0y 8a116818cf move to utils package 2020-12-21 15:38:33 +08:00