1
0
Fork 0
mirror of synced 2024-10-01 17:58:02 +13:00

refactor usage poc

This commit is contained in:
shimon 2024-01-28 15:33:04 +02:00
parent 36fddd4156
commit 44ed6826a9
3 changed files with 4 additions and 4 deletions

View file

@ -142,7 +142,7 @@ App::post('/v1/users')
->inject('hooks')
->action(function (string $userId, ?string $email, ?string $phone, ?string $password, string $name, Response $response, Document $project, Database $dbForProject, Event $queueForEvents, Hooks $hooks) {
$user = createUser('plaintext', '{}', $userId, $email, $password, $phone, $name, $project, $dbForProject, $queueForEvents, $hooks);
//Todo debug (to be removed laster @shimon)
//Todo debug (to be removed later @shimon)
//Console::log('@create user=' . time() . '=' . $user->getId());
$response
@ -1194,7 +1194,7 @@ App::delete('/v1/users/:userId')
$dbForProject->deleteDocument('users', $userId);
//Todo debug (to be removed laster @shimon)
//Todo debug (to be removed later @shimon)
//Console::log('@delete user=' . $userId . '=' . time() . '=' . $user->getId());
$queueForDeletes

View file

@ -43,7 +43,7 @@ class Usage extends Event
*/
public function addMetric(string $key, int $value): self
{
//Todo debug (to be removed laster @shimon)
//Todo debug (to be removed later @shimon)
// if ($key === 'users') {
// if ($value < 0) {
// console::log('@negative=' . $value);

View file

@ -86,7 +86,7 @@ class UsageDump extends Action
]));
} catch (Duplicate $th) {
if ($value < 0) {
//Todo debug (to be removed laster @shimon)
//Todo debug (to be removed later @shimon)
// var_dump([
// 'id' => $time . '_' . $period . '_' . $key,
// 'value' => $value,