#issue

1 messages · Page 1 of 1 (latest)

sick steppe
#

hmmm and you are using Squalize?

frank dagger
#
            /** A sequelize instance */
            this.db = await require('./database')(this), // this.db.models.Ticket...

            this.setMaxListeners(this.config.max_listeners); // set the max listeners for each event

            require('./update/notifier')(this); // check for updates

            const listeners = new ListenerLoader(this);
            listeners.load(); // load listeners
#
const { Sequelize } = require('sequelize');
    let sequelize;

    if (type === 'sqlite') {
        client.log.info('Using SQLite storage');
        sequelize = new Sequelize({
            dialect: types[type].dialect,
            logging: text => client.log.debug(text),
            storage: path('./user/database.sqlite')
        });
        client.config.defaults.log_messages = false;
        client.log.warn('Message logging is disabled due to insufficient database');
    } else {
        client.log.info(`Connecting to ${types[type].name} database...`);
        sequelize = new Sequelize(DB_NAME, DB_USER, DB_PASS, {
            dialect: types[type].dialect,
            host: DB_HOST,
            logging: text => client.log.debug(text),
            port: DB_PORT
        });
    }```
sick steppe
#

im no expert but if i were to guess theres something weird going on with how your interacting with the DB, when i used to have issues with SQL i would try some dumb things to get it to work like calling the find 2 times

#

you could try that to test it

#

sounds dumb but it could help lead you to a fix

frank dagger
#

that would be great!