Skip to content

Commit

Permalink
Attach the kj::Path in alarm-scheduler.c++
Browse files Browse the repository at this point in the history
This is an attempt to fix #1386
  • Loading branch information
jasnell committed Nov 27, 2023
1 parent b230f0f commit a10ceed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/workerd/server/alarm-scheduler.c++
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ AlarmScheduler::AlarmScheduler(
const kj::Clock& clock,
kj::Timer& timer,
const SqliteDatabase::Vfs& vfs,
kj::PathPtr path)
kj::Path path)
: clock(clock), timer(timer), random(makeSeededRandomEngine()),
db([&]{
auto db = kj::heap<SqliteDatabase>(vfs, path,
kj::WriteMode::CREATE | kj::WriteMode::MODIFY | kj::WriteMode::CREATE_PARENT);
kj::WriteMode::CREATE | kj::WriteMode::MODIFY | kj::WriteMode::CREATE_PARENT)
.attach(kj::mv(path));
ensureInitialized(*db);
return kj::mv(db);
}()),
Expand Down
2 changes: 1 addition & 1 deletion src/workerd/server/alarm-scheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class AlarmScheduler final : kj::TaskSet::ErrorHandler {
const kj::Clock& clock,
kj::Timer& timer,
const SqliteDatabase::Vfs& vfs,
kj::PathPtr path);
kj::Path path);

kj::Maybe<kj::Date> getAlarm(ActorKey actor);
bool setAlarm(ActorKey actor, kj::Date scheduledTime);
Expand Down

0 comments on commit a10ceed

Please sign in to comment.