Skip to content

Commit

Permalink
feat: deprecate disableScheduledEvents option
Browse files Browse the repository at this point in the history
  • Loading branch information
dnalborczyk committed Sep 24, 2022
1 parent 2cf2160 commit e7ad109
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/ServerlessOffline.js
Expand Up @@ -6,7 +6,7 @@ import {
defaultOptions,
SERVER_SHUTDOWN_TIMEOUT,
} from './config/index.js'
import { gray } from './config/colors.js'
import { gray, orange } from './config/colors.js'

export default class ServerlessOffline {
#cliOptions = null
Expand Down Expand Up @@ -61,6 +61,16 @@ export default class ServerlessOffline {
async start() {
this.#mergeOptions()

if (this.#options.disableScheduledEvents) {
log.notice()
log.warning(
orange(`'--disableScheduledEvents' is deprecated and will be removed in the next major version.
Please disable the event in the 'events.schedule.enabled' section of the serverless config.
If you are experiencing any issues please let us know: https://github.com/dherault/serverless-offline/issues`),
)
log.notice()
}

const { httpEvents, lambdas, scheduleEvents, webSocketEvents } =
this.#getEvents()

Expand Down

0 comments on commit e7ad109

Please sign in to comment.