File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
lib/private/LanguageModel/Db Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 66use OCP \AppFramework \Db \Entity ;
77use OCP \AppFramework \Db \MultipleObjectsReturnedException ;
88use OCP \AppFramework \Db \QBMapper ;
9+ use OCP \AppFramework \Utility \ITimeFactory ;
910use OCP \DB \Exception ;
1011use OCP \IDBConnection ;
1112
1213/**
1314 * @extends QBMapper<Task>
1415 */
1516class TaskMapper extends QBMapper {
16- public function __construct (IDBConnection $ db ) {
17+ public function __construct (
18+ IDBConnection $ db ,
19+ private ITimeFactory $ timeFactory ,
20+ ) {
1721 parent ::__construct ($ db , 'llm_tasks ' , Task::class);
1822 }
1923
@@ -45,7 +49,7 @@ public function deleteOlderThan(int $timeout): int {
4549 }
4650
4751 public function update (Entity $ entity ): Entity {
48- $ entity ->setLastUpdated (time ());
52+ $ entity ->setLastUpdated ($ this -> timeFactory -> now ()-> getTimestamp ());
4953 return parent ::update ($ entity );
5054 }
5155}
You can’t perform that action at this time.
0 commit comments