Skip to content
This repository was archived by the owner on Apr 13, 2020. It is now read-only.
This repository was archived by the owner on Apr 13, 2020. It is now read-only.

Rethinking server/player.js #3

Description

@SamuelWitke

The project is currently using kue to handle job priority and process.

So a work around to handle removing active songs for each project I have to

let exitActivJob = {};
let timeOutPlayer = {};
...
        exitActivJob[`${projects}`] = () => {
            done();
        };
...
 timeOutPlayer[`${projects}`] = setTimeout( async () => {
if(job.state('active') && song.song.uri === active && exitActivJob[`${projects}`] && timeOutPlayer[`${projects}`]){
                        exitActivJob[`${projects}`]();
                        exitActivJob[`${projects}`]=undefined;
                        clearTimeout(timeOutPlayer[`${projects}`]);
                        timeOutPlayer[`${projects}`] = undefined
}

This is a hack that works when only one active user but if anyone has a better suggestion please let me know.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions