Skip to content

Commit 350f9be

Browse files
authored
refactor(UuidRequestIdProcessor): extract uuid setting logic to separate method (#152)
* refactor(UuidRequestIdProcessor): extract uuid setting logic to separate method Move the logic for setting the UUID into a dedicated setUuid method to improve code reusability and maintainability * fix(logger): simplify uuid request id handling and add tests Refactor the uuid request id processor to simplify the logic by checking for existing request id first. Add comprehensive tests to verify behavior in different coroutine scenarios. * feat(CrontabExecutorAspect): add timestamp to crontab execution logs Add created_at field to track when crontab executions occur
1 parent 62c71a2 commit 350f9be

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/Aspect/CrontabExecutorAspect.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
namespace Mine\Crontab\Aspect;
1414

15+
use Carbon\Carbon;
1516
use Hyperf\Crontab\Crontab;
1617
use Hyperf\Crontab\Strategy\Executor;
1718
use Hyperf\DbConnection\Db;
@@ -46,6 +47,7 @@ public function process(ProceedingJoinPoint $proceedingJoinPoint)
4647
'target' => $callback,
4748
'status' => $isSuccess ? 1 : 0,
4849
'exception_info' => $throwable === null ? '' : $throwable->getMessage(),
50+
'created_at' => Carbon::now(),
4951
]);
5052
}
5153
return $proceedingJoinPoint->process();

0 commit comments

Comments
 (0)