This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from peewee import * | |
| class BModel(Model): | |
| class Meta: | |
| database = db | |
| @classmethod | |
| def create_table(cls, *args, **kwargs): | |
| for field in cls._meta.get_fields(): | |
| if hasattr(field, "pre_field_create"): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'sidekiq/api' | |
| # 1. Clear retry set | |
| Sidekiq::RetrySet.new.clear | |
| # 2. Clear scheduled jobs | |
| Sidekiq::ScheduledSet.new.clear |