douxu
4d5fcbc376
Refactor async task system with unified task interfaces and add test task type
...
- Create task/types_v2.go with unified task type definitions and interfaces
* Add UnifiedTaskType and UnifiedTaskStatus constants
* Define Task:Params interface for parameter validation and serialization
* Define UnifiedTask interface as base for all task implementations
* Add BaseTask for common task functionality
2026-04-14 17:00:30 +08:00
douxu
f8c0951a13
Extend async task system with database integration and retry management
...
- Add AsyncTaskConfig to config structure
- Create database operations for task state management (async_task_extended.go)
- Add configuration middleware for Gin context
- Extract task worker initialization to separate file (initializer.go)
- Implement retry strategies with exponential backoff (retry_manager.go)
- Add retry queue for failed task scheduling (retry_queue.go)
- Enhance worker metrics with detailed per-task-type tracking
- Integrate database operations into task worker for status updates
- Add comprehensive metrics logging system
2026-04-03 10:07:43 +08:00
douxu
9e4c35794c
implemented task queue publishing using RabbitMQ
...
Added configuration middleware integration
Added retry logic for queue publishing
Added task worker initialization (main.go):
Created initTaskWorker function for task worker configuration
Added worker startup and shutdown logic
Added CORS middleware configuration
Registered config middleware
2026-04-01 17:15:33 +08:00
douxu
7ea66e48af
add code of async task system
2026-03-20 15:00:04 +08:00
douxu
de5f976c31
add route of async task system
2026-03-17 16:08:46 +08:00
douxu
adcc8c6c91
add code of async task system
2026-03-13 11:45:22 +08:00
douxu
6e0d2186d8
optimize code of async task system
2026-03-12 16:37:06 +08:00
douxu
a94abdb479
initialize the asynchronous task system's initial structure
2026-03-05 17:15:51 +08:00
douxu
898beaeec4
optimize struct of rabbitmq event
2026-03-02 17:00:09 +08:00
douxu
4b52e5f3c6
optimize code of event record and push rabbitmq func
2026-02-28 17:38:33 +08:00
douxu
f6bb3fb985
optimize code of push event to rabbitmq
2026-02-26 16:48:12 +08:00
douxu
2ececc38d9
optimzie code organization structure of rabbitmq event
2026-02-25 17:14:25 +08:00
douxu
6c9da6fcd4
init event struct with option mode
2026-02-24 17:08:48 +08:00
douxu
56b9999d6b
add constants varibale of power system events
2026-02-12 17:09:08 +08:00
douxu
1c385ee60d
optimize code of rabbitmq connection and event alarm struct
2026-02-11 16:43:42 +08:00
douxu
6618209bcc
optimzie code of rabbitmq connection
2026-02-06 17:45:59 +08:00
douxu
581153ed8d
add git ignore item of mask certificate files
2026-02-05 17:01:16 +08:00
douxu
f45b7d5fa4
optimize code of init rabbitmq connect func
2026-02-04 17:43:09 +08:00
douxu
9be984899c
optimize code of push event alarm func
2026-02-03 17:05:32 +08:00
douxu
35cb969a54
add code of inter-module communication
2026-02-02 16:48:46 +08:00
douxu
02e0c9c31a
optimzie of postgres db code
2026-01-30 17:42:50 +08:00
douxu
2126aa7b06
optimize code of config
2026-01-29 17:00:20 +08:00
douxu
3374eec047
optimize code of redis init
2026-01-28 16:49:12 +08:00
douxu
3ff29cc072
optimize code of real time data pull api
2026-01-28 14:03:25 +08:00
douxu
617d21500e
optimize code of redis connenct func and real time data calculate
2026-01-27 17:41:17 +08:00
douxu
1a1727adab
optimize reponse code and business code of measurement sub api
2026-01-26 16:29:50 +08:00
douxu
fd2b202037
optimize code of websocket close handler
2026-01-22 16:19:00 +08:00
douxu
13433f93e5
optimize code of custom error structure
2026-01-20 16:42:54 +08:00
douxu
e1886bc347
optimize code of judge wether success or failed return content
2026-01-19 16:39:35 +08:00
douxu
ba5e5b3d1c
optimzie code of constants package
2026-01-16 17:08:28 +08:00
douxu
d3b1f0afbe
add code of send all target removed system signal in real time data pull api and fix bug of component attribute query api
2026-01-14 17:32:01 +08:00
douxu
cf880279e4
optimize real time data query api
2026-01-13 17:23:47 +08:00
douxu
34684bd5f1
fix: eliminate server error code definition conflicts
2026-01-13 11:45:03 +08:00
douxu
d75b9a624c
optimize handler of compoent attribute query api
2026-01-13 11:39:00 +08:00
douxu
cceffa8219
add handler of compoent attribute query api
2026-01-12 17:21:04 +08:00
douxu
d1495b7ab8
optimize code of component attribute update api
2026-01-09 17:26:45 +08:00
douxu
60eab0675e
optimize code of component attrbute update api
2026-01-08 17:34:44 +08:00
douxu
f47e278f85
fix bug of first subscription different interval measurement data
2026-01-07 17:28:09 +08:00
douxu
a31bd6f395
add component attribute group update api and optimzie diagram hash set params
2026-01-05 17:20:41 +08:00
douxu
29d0e06c94
add new structure field of measurement table and add new test data of component table and station table
2026-01-04 17:12:00 +08:00
douxu
fcf4ef3f7d
fix bug of token4-token7 type attribute recommend api
2025-12-31 16:52:40 +08:00
douxu
e74bedd47f
fix bug of token4-token7 type recommend api
2025-12-31 16:24:27 +08:00
douxu
36e196bedd
add nspath filter of recommend api
2025-12-30 16:35:29 +08:00
douxu
941d521328
fix bug of token6 all search result return case
2025-12-29 15:58:59 +08:00
douxu
7969861746
optimize func of cleanup recommend redis cache
2025-12-26 17:10:22 +08:00
douxu
8e4bdfd0e9
add fullpath completion of component attribute group recommend
2025-12-26 12:00:00 +08:00
douxu
42751c1020
optimize the logic for loading the cache of measurement nodes for traversing components
2025-12-25 17:17:20 +08:00
douxu
51f65500f3
add func of init component measurement recommend
2025-12-24 16:55:55 +08:00
douxu
7ea38615b4
unified caching system collection key names
2025-12-24 09:34:03 +08:00
douxu
6e16a9a39a
fix bug of measurement recommend injection func
2025-12-24 09:06:42 +08:00