-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(timeout): compare creation time to now - timeout #497
Conversation
Haven't been able to test this yet myself. |
Please also check if we can cover this with tests, we have something around expiry in files_lock/tests/Feature/LockFeatureTest.php Lines 183 to 205 in 16d856f
|
Makes sense code wide 👍 |
9fa2d3d
to
f3c7152
Compare
I added an assertion to the test but it's failing. Maybe we can investigate together in the coming days. Locally the test fails for me before it even gets to this point. Actually I think I will turn this into two tests. |
db98b9d
to
a41ab3c
Compare
@juliusknorr I think the failing static test is somehow a sideeffect of adding logging to lib/Service/LockService.php - but I don't understand how that would come about. |
Fixes #264. Signed-off-by: Max <[email protected]>
Signed-off-by: Max <[email protected]>
805ec40
to
a6efda4
Compare
lib/Service/LockService.php
Outdated
|
||
/** | ||
* @param string $message | ||
* @param bool $trace | ||
* @param array $serializable | ||
*/ | ||
private function notice(string $message, bool $trace = false, array $serializable = []) { | ||
$opts = ['app' => 'files_lock']; | ||
if ($trace) { | ||
$opts['exception'] = new HintException($message, json_encode($serializable)); | ||
} elseif (!empty($serializable)) { | ||
$message .= ' -- ' . json_encode($serializable); | ||
} | ||
$this->logger->notice('[notice] ' . $message, $opts); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly took this from the TLogger
trait - but i don't know how the Psr\Log\LoggerInteface
works:
- do we still need to prefix the message with
[notice]
? - do the $opts have the same effect they used to have in the
TLogger
?
Signed-off-by: Max <[email protected]>
a6efda4
to
a26ce04
Compare
/backport to stable31 |
/backport to stable30 |
/backport to stable29 |
/backport to stable28 |
Fixes #264.