Commit graph

19 commits

Author SHA1 Message Date
Greyson Parrelli
145794bf04
Add the ability to set job priority. 2023-11-03 12:21:27 -04:00
Greyson Parrelli
8bad476315 Fix backoff interval scheduling for jobs. 2023-09-18 12:06:42 -04:00
Greyson Parrelli
a911a007d2 Change job scheduling to be relative rather than absolute. 2023-09-06 09:34:48 -04:00
Greyson Parrelli
9a7d8c858d Convert JobDatabase to Kotlin. 2023-08-31 14:33:53 -04:00
Greyson Parrelli
8339c0d8de Convert JobManager tests to kotlin. 2023-08-29 09:33:45 -04:00
Greyson Parrelli
bbdf54097e Prevent certain types of circular job dependencies. 2023-04-05 16:40:23 -03:00
Greyson Parrelli
7c8de901f1 Store Job data as bytes. 2023-03-22 14:28:09 -04:00
Greyson Parrelli
8950100bd7
Decrypt and process messages all in one transaction.
Giddy up
2021-02-23 18:34:18 -05:00
AsamK
8f51bdcb78 Adapt maxInstancesForQueue to only consider instances of the same job.
Currently the maxInstancesForQueue limit checks the count of all jobs in a
given queue. If there are already too many jobs, the new job is discarded.

However this is not the expected behavior for the two jobs where it's used:
GroupCallPeekWorkerJob and AutomaticSessionResetJob
For both the expected behavior is that there aren't too many jobs of them
started, but that there will be at least one instance of them started.
Both of them use the same queue as the PushProcessMessageJob and the MarkerJob.
Those two jobs are often in the queue at the same time, effectively preventing
the GroupCallPeekWorkerJob and AutomaticSessionResetJob from being enqueued.
2021-02-08 14:26:59 -05:00
Greyson Parrelli
1d83729e6c Move backoff calculation into jobs. 2021-01-28 18:44:04 -05:00
Greyson Parrelli
01152ead61 Move the JobDatabase to a separate physical database.
Also removes maxInstancesPerFactory from DB, which was only used during job submission and had no need to be persisted.
2021-01-06 17:03:21 -04:00
Greyson Parrelli
c3d7b88cf6
Add support for setting max instances per job queue. 2020-12-07 17:30:05 -05:00
Greyson Parrelli
8e93bf9075 Create a core-util module with some common utilities. 2020-12-05 13:44:13 -05:00
Greyson Parrelli
7868c3094b Make FastJobStorage synchronous again. 2020-12-05 13:44:13 -05:00
Greyson Parrelli
87a59b6a9b Add support for memory-only jobs. 2020-06-25 18:14:54 -04:00
Greyson Parrelli
f8a0988e5f Various JobManager performance improvements. 2020-06-25 08:29:48 -04:00
Greyson Parrelli
1234899ea1 Add support for non-blocking media sends. 2020-06-06 20:25:02 -04:00
Greyson Parrelli
35f4f3f81e Add support for passing data between jobs. 2020-04-21 13:33:41 -04:00
Alan Evans
9ebe920195 Move all files to natural position. 2020-01-06 11:08:30 -05:00