Skip to content
This repository has been archived by the owner on Apr 15, 2022. It is now read-only.

Merge develop to master, add WAL mode #16

Merged
merged 4 commits into from
Jul 31, 2017
Merged

Merge develop to master, add WAL mode #16

merged 4 commits into from
Jul 31, 2017

Conversation

aronasorman
Copy link
Collaborator

label the worker threads as daemons.
That allows the python interpreter to shut down if only the worker threads are
remaining.

Implement MonitorThread's start job pipeline.
MonitorThread monitors the messaging backend for new messages, and acts
correspondingly. For now, it just looks for START_JOB messages and adds it to
the workers' job queue.

change the inmem messaging backend queue implementation from deque to Queue.

remove deque import

add logger setup to common.classes

lint setup.py

lint messaging.backends.inmem

implement reportqueue adding if job was a success

remove pdb traces

use py2 and py3 compatible syntax for using ABCMeta

refactor common things in Worker thread to use BaseCloseableThread

create abstract method for storage backend

complete signature for messaging.inmem.send backend

first pass on scheduling and running jobs completely.

Make "pip install -e ." work, although some dependencies are still missing

Mark jobs as completed.

don't limit the queue size we can file at one time.

don't remove from the queue even if it's running.
May want to reinstitute this in the future.

add requirements

add failing test for scheduling a lot of jobs at the same time.

Merge pull request #4 from benjaoming/setup-impro
Make "pip install -e ." work
Don't make src a package

Merge pull request #6 from benjaoming/setup-impro
More impro stuff
add python 2 backport requirements.

Move function fully qualified name saving from the Client's responsibility to the Job class.

Add SuccessMessage type

Simplify Worker backend by using concurrent.futures.

Implement InfiniteLoopThread, a generic thread that runs a function forever.

Add timeout parameter to messaging.pop abstractmethod

fix job completion marking

flesh out worker sending of success message.

Add the queued job state, and give a better string representation of a Job

fix bug InfiniteLoopThread only sleeps when we get an exception.
Now sleep even through success or failure 💤

properly mark jobs as running, then take them off the queue.

catch a possible timeout exception from waiting for a job update.

Extend get_lambda_to_execute to support passing in a function for progress updating.

Create a ProgressMessage class for updating our progress.

Create a new FailureMessage class

Allow job progress updates.

Fetch the job AFTER we get an update about it.
Or else the state we have for the job will be outdated.

Implement failure notification for jobs.

Merge pull request #10 from learningequality/install-requires
Add python 2 backports dependencies
Add pre commit hooks (copied from Kolibri)

Add tox support and gather coverage

Add Travis support

Add enum34 dependency

Translate README to rst (using pandoc)

Use README.rst for setup.py

Additional requirements missing in setup.py

rename InfiniteLoopThread.cancel to stop

refactor Scheduler to use InfiniteLoopThread instead of defining its own thread instance.

add docstrings for the client classes

remove unused functions and classes

add comment documentation for the job's states

Properly set the initial values of traceback and exception

add docstrings for Job.

Add initial changelog.

Python 2+3 import of queue

Add missing init.py files

Wrapping up non-finished Py2 compatibility for this PR

Merge pull request #8 from benjaoming/setup-impro
More impro, fixing python 3.4
Merge remote-tracking branch 'origin/develop' into refactor-futures

get tests passing on python27

Add sqlalchemy and remove enum34

truly remove enum dependency

second pass on a SQL-based job storage backend.
Jobs aren't being viewed still :(

implement barbequeue.exceptions.TimeoutError

Fix test that expects MessageType to be an enum

use NotImplementedError, not NotImplemented
latter is not an exception

make sure read sessions are closed.
Else we have contentions for connections

more fixes to get stuff working on sqlalchemy

add client.all_jobs() and client.clear()
Needed to have feature parity with django_q.

Properly set orm_job.obj value.

allow failed jobs to track the exception and traceback

Fix clearing of jobs.

Implement SimpleClient to allow users to specify the worker process type and storage location

remove pdb call from simpletest

Always have concurrent-futures as a dependency.

Add wait and wait_for_completion on the client class

conditionally import processpool and threadpool.
Apparently on Android, even just importing processpoolexecutor would cause an error.

add docs on update_progress

Add force parameter to storage.clear

Lint import statements

add force parameter to client.clear.

get tests passing again!!!!

bulk process worker messages

remove barbequeue from requirements.txt

Properly shut down threads before shutting down the interpreter.

Remove unused namespace id variable.

Change the threads we spawn into non-daemon threads.

Use our own bundled version of six.
See why here: learningequality/kolibri#1836 (comment)

add WAL mode to our SQLite DB.

@aronasorman aronasorman merged commit b01890b into master Jul 31, 2017
@rtibbles rtibbles deleted the wal-disney branch March 1, 2019 15:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant