Skip to content

Commit

Permalink
fix: use mongoose options for mongodb job store
Browse files Browse the repository at this point in the history
  • Loading branch information
yujiosaka committed Oct 29, 2023
1 parent ccc34ad commit 7db82e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,13 @@ Connect to a MongoDB server.
#### `connect`

```ts
static connect(url: string, options: MongoClientOptions): Promise<MongodbJobStore>
static connect(url: string, options: ConnectOptions): Promise<MongodbJobStore>
```

**Parameters**:

- `url`: [string] - MongoDB connection URL.
- `options`: [MongoClientOptions] - Options for MongoDB connection.
- `options`: [ConnectOptions] - Options for MongoDB connection.

#### Methods

Expand Down Expand Up @@ -237,7 +237,7 @@ close(): Promise<Job>
[Date]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date "Date"
[Duration]: https://date-fns.org/v2.30.0/docs/Duration "Duration"
[BaseJobStore]: https://github.com/yujiosaka/Cronyx/blob/main/docs/API.md#class-basejobstore "BaseJobStore"
[MongoClientOptions]: https://www.mongodb.com/docs/drivers/node/current/fundamentals/connection/connection-options/ "MongoClientOptions"
[ConnectOptions]: https://mongoosejs.com/docs/connections.html#options "ConnectOptions"
[RedisClientOptions]: https://github.com/redis/node-redis/blob/master/docs/client-configuration.md "RedisClientOptions"
[MysqlConnectionOptions]: https://typeorm.delightful.studio/interfaces/_driver_mysql_mysqlconnectionoptions_.mysqlconnectionoptions.html "MysqlConnectionOptions"
[PostgresConnectionOptions]: https://typeorm.delightful.studio/interfaces/_driver_postgres_postgresconnectionoptions_.postgresconnectionoptions "PostgresConnectionOptions"
Expand Down
3 changes: 1 addition & 2 deletions src/job-store/mongodb.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { MongoError } from "mongodb";
import type { ConnectOptions } from "mongodb";
import type { Connection, ConnectOptions, Model, Types } from "mongoose";
import { createConnection } from "mongoose";
import type { Connection, Model, Types } from "mongoose";
import type BaseJobStore from ".";
import { CronyxNotFoundError } from "../error";
import type MongodbJobLock from "../job-lock/mongodb";
Expand Down

0 comments on commit 7db82e3

Please sign in to comment.