Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected behavior in Apps Jobs processors #22863

Closed
felipetomm opened this issue Aug 4, 2021 · 3 comments
Closed

Unexpected behavior in Apps Jobs processors #22863

felipetomm opened this issue Aug 4, 2021 · 3 comments

Comments

@felipetomm
Copy link

felipetomm commented Aug 4, 2021

Description:

The processor that run in Apps is running in a loop, independent of your time to run new job.

Steps to reproduce:

  1. Create an App with an simple OneTime job with an time to run again;
  2. In Apps log screen, see growing the logs list, without respect the interval time.

Expected behavior:

When an job have an interval time, the expected behavior is run the job only when the time is going.

Actual behavior:

In a job with interval time, after first execution the processor run after every time, like a loop.

Server Setup Information:

  • Version of Rocket.Chat Server: 3.17.0 Enterprise
  • Operating System: Linux
  • Deployment Method: docker
  • Number of Running Instances: 3
  • DB Replicaset Oplog:
  • NodeJS Version: 12.22.1
  • MongoDB Version: 4.0.25

Client Setup Information

  • Desktop App or Browser Version:
  • Operating System:

Additional context

Example of Job on App

public async extendConfiguration(configuration: IConfigurationExtend): Promise<void> {
        await configuration.scheduler.registerProcessors([
            {
                id: 'SIMPLE_JOB',
                startupSetting: {
                    type: StartupType.ONETIME,
                    when: new Date( new Date().getTime() + 1 * 60000 )
                },
                processor: async(jobContext: IJobContext,read: IRead, modify: IModify, http: IHttp, persis: IPersistence ) => {
                    this.getLogger().log('Simple job running')
                }
            }
        ])
    }

Example of the behavior

Peek 04-08-2021 17-32-JobBug

@johncrisp
Copy link

Hi and thanks for reporting this.

We'll check with the Product Manager as this should probably be in a different repo.

We'll keep you posted.

@johncrisp
Copy link

Hi, I spoke the Product team who replied as follows:

We are aware about it. It's not a problem with Apps Engine itself, but the Apps Engine squad are taking care of it.

This PR should fix it.

#22882

Thanks.

@felipetomm
Copy link
Author

Thanks @johncrisp for your report!
Has you describe, the problem is solved in 3.17.1 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants