From 8a8396c454206feb589a806db2ddf8a03d2d757e Mon Sep 17 00:00:00 2001
From: jason
Date: Tue, 24 May 2016 20:19:12 -0600
Subject: 0.2.1 update
---
_sources/index.txt | 2 +-
_sources/protocol.txt | 13 ++-
_sources/settings_file.txt | 51 +++++++++
_sources/using.txt | 8 ++
api.html | 10 +-
client.html | 7 +-
client/messages.html | 77 +++++++------
contributing.html | 9 +-
exceptions.html | 7 +-
genindex.html | 59 +++++-----
index.html | 13 ++-
jobmanager.html | 45 +++++---
objects.inv | Bin 1355 -> 1369 bytes
poller.html | 7 +-
protocol.html | 46 ++++----
py-modindex.html | 5 +-
receiver.html | 7 +-
router.html | 78 +++++++++-----
search.html | 5 +-
searchindex.js | 2 +-
sender.html | 11 +-
settings_file.html | 261 +++++++++++++++++++++++++++++++++++++++++++++
using.html | 217 +++++++++++++++++++++++++++++++++++++
utils/classes.html | 54 +++++++---
utils/devices.html | 6 +-
utils/index.html | 19 +++-
utils/messages.html | 51 +++++++--
utils/settings.html | 15 ++-
utils/timeutils.html | 17 +--
29 files changed, 892 insertions(+), 210 deletions(-)
create mode 100644 _sources/settings_file.txt
create mode 100644 _sources/using.txt
create mode 100644 settings_file.html
create mode 100644 using.html
diff --git a/_sources/index.txt b/_sources/index.txt
index da6e513..25fc86f 100644
--- a/_sources/index.txt
+++ b/_sources/index.txt
@@ -5,6 +5,7 @@ EventMQ Documentation
.. toctree::
:maxdepth: 2
+ using
api
contributing
@@ -15,4 +16,3 @@ Indices and tables
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
-
diff --git a/_sources/protocol.txt b/_sources/protocol.txt
index 4c2aff0..c341403 100644
--- a/_sources/protocol.txt
+++ b/_sources/protocol.txt
@@ -71,7 +71,7 @@ FRAME Value Description
1 eMQP/1.0 Protocol version
2 REQUEST command
3 _MSGID_ A unique id for the msg
-4 _QUEUE_NAME_ the name of the queue the worker belongs to
+4 _QUEUE_NAME_ the name of the queue the request should be sent to
5 _HEADERS_ dictionary of headers. can be an empty set
6 _MSG_ The message to send
====== ============== ===========
@@ -85,7 +85,7 @@ FRAME Value Description
1 eMQP/1.0 Protocol version
2 PUBLISH command
3 _MSGID_ A unique id for the msg
-4 _TOPIC_NAME_ the name of the queue the worker belongs to
+4 _TOPIC_NAME_ the name of the topic this message should be published across
5 _HEADERS_ csv list of headers
6 _MSG_ The message to send
====== ============== ===========
@@ -99,7 +99,7 @@ FRAME Value Description
1 eMQP/1.0 Protocol version
2 SCHEDULE command
3 _MSGID_ A unique id for the msg
-4 _TOPIC_NAME_ name of queue that the job should run in
+4 _QUEUE_NAME_ name of queue that the job should run in
5 _HEADERS_ csv list of headers for this message
6 _MSG_ The message to send
====== ============== ===========
@@ -113,7 +113,7 @@ FRAME Value Description
1 eMQP/1.0 Protocol version
2 UNSCHEDULE command
3 _MSGID_ A unique id for the msg
-4 _TOPIC_NAME_ ignored for this command, broadcasted to all queues
+4 _QUEUE_NAME_ ignored for this command, broadcasted to all queues
5 _HEADERS_ csv list of headers for this message
6 _MSG_ The message to send
====== ============== ===========
@@ -129,7 +129,7 @@ FRAME Value Description
1 eMQP/1.0 Protocol version
2 INFORM command
3 _MSGID_ A unique id for the msg
-4 _QUEUE_NAME_ csv seperated names of queue the worker belongs to
+4 Queues. Unused for scheduler
5 scheduler type of peer connecting
====== ============== ===========
@@ -144,7 +144,7 @@ FRAME Value Description
1 eMQP/1.0 Protocol version
2 INFORM command
3 _MSGID_ A unique id for the msg
-4 _QUEUE_NAME_ csv seperated names of queue the worker belongs to.
+4 _QUEUES_ csv seperated arrays containing an int and a string for weight and name. e.g. [40, 'email']
5 worker type of peer connecting
====== ============== ===========
@@ -203,7 +203,6 @@ Heartbeating
* If the worker detects that the broker disconnected it SHOULD restart the conversation.
* If the broker detects that a worker has disconnected it should stop sending it a message of any type.
* If the scheduler detects that the broker disconnects it SHOULD restart the conversation.
- * If the broker detects that a scheduler has disconnected it should ??????????.
REQUEST Headers
---------------
diff --git a/_sources/settings_file.txt b/_sources/settings_file.txt
new file mode 100644
index 0000000..b0bc36c
--- /dev/null
+++ b/_sources/settings_file.txt
@@ -0,0 +1,51 @@
+########
+Settings
+########
+EventMQ uses a standard INI style config file found at ``/etc/eventmq.conf``.
+
+******
+Router
+******
+
+*********
+Scheduler
+*********
+
+***********
+Job Manager
+***********
+
+concurrent_jobs
+===============
+Default: 4
+
+This is the number of concurrent jobs the indiviudal job manager should execute
+at a time. If you are using the multiprocess or threading model this number
+becomes important as you will want to control the load on your server. If the
+load equals the number of cores on the server, processes will begin waiting for
+cpu cycles and things will begin to slow down.
+
+A safe number to choose if your jobs block a lot would be (2 * cores). If your
+jobs are cpu intensive you will want to set this number to the number of cores
+you have or (cores - 1) to leave cycles for the os and other processes. This is
+something that will have to be tuned based on the jobs that are
+running. Grouping similar jobs in named queues will help you tune this number.
+
+queues
+======
+Default: (10, default)
+
+Semi-colon seperated list of queues to process jobs for with thier
+weights. Example: ``queues=(10, data_process); (15, email)``. With these
+weights and the ``CONCURRENT_JOBS`` setting, you should be able to tune managers
+running jobs locally pretty efficiently. If you have a larger box with a weight
+of 50 on q1 and 8 concurrent jobs and a smaller box with a weight 30 and 4
+concurrent jobs, the q1 jobs will be sent to the large box until it is no longer
+accepting jobs. At this point jobs will start to be sent to the next highest
+number until the large box is ready to accept another q1 job.
+
+.. note::
+
+ It is recommended that you have some workers listening for jobs on your
+ default queue so that anything that is not explicitly assigned will still be
+ run.
diff --git a/_sources/using.txt b/_sources/using.txt
new file mode 100644
index 0000000..3c6a517
--- /dev/null
+++ b/_sources/using.txt
@@ -0,0 +1,8 @@
+#############
+Using EventMQ
+#############
+
+.. toctree::
+ :maxdepth: 2
+
+ settings_file
diff --git a/api.html b/api.html
index 7934f74..03dcd6d 100644
--- a/api.html
+++ b/api.html
@@ -32,7 +32,7 @@
-
+
@@ -60,7 +60,7 @@
retry_count (int) – How many times should be retried when encountering
an Exception or some other failure before giving up. (default: 0
-or immediatly fail)
-
queue (str) – Name of queue to use when executing the job. Default: is
-configured default queue name
+or immediately fail)
+
queue (str) – Name of queue to use when executing the job. If this value
+evaluates to False, the default is used. Default: is configured
+default queue name
-
Returns:
True if the message was successfully queued, False if something
-went wrong. If something did go wrong check the logs for details.
+
Returns:
ID for the message/deferred job. This value will be None if there
+was an error.
block (bool) – Set to True if you wish to block and wait for the
-response. This may be useful for running quick but cpu intesive
-that would otherwise overwhelm a box that has to do it all alone.
-(decryption?)
@@ -291,7 +286,7 @@ the headers then they have been enabled.
-
Parameters:
+
Parameters:
retry_count (int) – How many times should be retried when encountering
an Exception or some other failure before giving up. (default: 0
or immediatly fail)
@@ -300,13 +295,19 @@ configured default queue name