refactor usage poc
This commit is contained in:
parent
36fddd4156
commit
44ed6826a9
3 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue