@mastra/pg 1.30.0-alpha.0 → 1.30.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -20424,9 +20424,9 @@ var SchedulesPG = class SchedulesPG extends SchedulesStorage {
20424
20424
  if (!updated) throw new Error(`Schedule ${id} not found`);
20425
20425
  return updated;
20426
20426
  }
20427
- async updateScheduleNextFire(id, expectedNextFireAt, newNextFireAt, lastFireAt, lastRunId) {
20427
+ async updateScheduleNextFire(id, expectedNextFireAt, newNextFireAt, lastFireAt, lastRunId, newStatus) {
20428
20428
  return ((await this.#client.query(`UPDATE ${this.#table(TABLE_SCHEDULES)}
20429
- SET next_fire_at = $1, last_fire_at = $2, last_run_id = $3, updated_at = $4
20429
+ SET next_fire_at = $1, last_fire_at = $2, last_run_id = $3, updated_at = $4, status = COALESCE($8, status)
20430
20430
  WHERE id = $5 AND next_fire_at = $6 AND status = $7`, [
20431
20431
  newNextFireAt,
20432
20432
  lastFireAt,
@@ -20434,7 +20434,8 @@ var SchedulesPG = class SchedulesPG extends SchedulesStorage {
20434
20434
  Date.now(),
20435
20435
  id,
20436
20436
  expectedNextFireAt,
20437
- "active"
20437
+ "active",
20438
+ newStatus ?? null
20438
20439
  ])).rowCount ?? 0) > 0;
20439
20440
  }
20440
20441
  async deleteSchedule(id) {